R-CMD-check-bioc #747
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on | |
# - https://lcolladotor.github.io/biocthis/reference/use_bioc_github_action | |
# - https://github.com/tidyverse/ggplot2/blob/master/.github/workflows/R-CMD-check.yaml | |
# - https://github.com/r-lib/actions/tree/master/examples | |
# - https://github.com/maxheld83/ghactions | |
# - https://github.com/seandavi/BiocActions | |
on: | |
push: | |
branches-ignore: | |
- gh-pages | |
pull_request: | |
branches-ignore: | |
- gh-pages | |
schedule: | |
- cron: "0 7 * * 1,3,5" # Run every Monday/Wednesday/Friday at 07:00 UTC | |
name: R-CMD-check-bioc | |
# Increment to clear the cache or include "/nocache" in commit message | |
env: | |
cache-version: v5 | |
jobs: | |
R-CMD-check-r-lib: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (bioc-${{ matrix.config.biocversion }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
# - {os: windows-latest, biocversion: "release"} | |
# - {os: windows-latest, biocversion: "devel"} | |
- {os: macOS-latest, biocversion: "release"} | |
# - {os: macOS-latest, biocversion: "devel"} | |
- {os: ubuntu-latest, biocversion: "release"} | |
# - {os: ubuntu-latest, biocversion: "devel"} | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
TZ: UTC | |
NOT_CRAN: true | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
BIOCVERSION: ${{ matrix.config.biocversion }} | |
steps: | |
# https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml | |
- uses: actions/checkout@v3 | |
- name: Find R version to run | |
run: | | |
# Define R version to use | |
config="https://bioconductor.org/config.yaml" | |
rversion=$(curl ${config} | \ | |
grep r_version_associated_with_${BIOCVERSION} | \ | |
grep -o "[0-9]*\.[0-9]*\.[0-9]*") | |
echo "Using R ${rversion}..." | |
echo "rversion=${rversion}" >> $GITHUB_ENV | |
shell: | |
bash {0} | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ env.rversion }} | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: | | |
any::rcmdcheck | |
any::BiocCheck | |
needs: check | |
- uses: r-lib/actions/check-r-package@v2 | |
with: | |
args: 'c("--no-build-vignettes", "--no-manual", "--timings")' | |
build_args: 'c("--no-manual", "--no-resave-data")' | |
error-on: '"warning"' | |
check-dir: '"check"' | |
- name: R CMD BiocCheck | |
run: | | |
# Continue even if BiocCheck finds an error | |
BiocCheck::BiocCheck(dir('check', 'tar.gz$', full.names = TRUE), `no-check-R-ver` = TRUE, `no-check-bioc-help` = TRUE) | |
# For more options: http://bioconductor.org/packages/release/bioc/vignettes/BiocCheck/inst/doc/BiocCheck.html | |
shell: Rscript {0} | |
- name: Upload check results | |
if: failure() | |
uses: actions/upload-artifact@master | |
with: | |
name: ${{ runner.os }}-bioc-${{ matrix.config.biocversion }}-r-${{ env.rversion }}-results | |
path: check | |
- name: Test coverage | |
if: runner.os == 'macOS' && matrix.config.biocversion == 'release' | |
run: | | |
install.packages("remotes") | |
remotes::install_cran("covr") | |
covr::codecov() | |
shell: Rscript {0} |