Skip to content

Commit

Permalink
Updated the check action to use the BioC-devel image.
Browse files Browse the repository at this point in the history
Also avoid duplicate runs on push to PRs.
  • Loading branch information
LTLA committed Feb 22, 2024
1 parent 583dc95 commit 6404f5f
Showing 1 changed file with 32 additions and 9 deletions.
41 changes: 32 additions & 9 deletions .github/workflows/r-cmd-check.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

name: R CMD check

jobs:
check:
name: R CMD check
runs-on: ubuntu-latest
container: ghcr.io/artifactdb/alabaster-docker/builder:latest
container: bioconductor/bioconductor_docker:devel

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set directories
run: |
echo "R_PKG_DIR=${R_HOME}/site-library" >> $GITHUB_ENV
- name: Restore the package directory
uses: actions/cache@v3
with:
path: ${{ env.R_PKG_DIR }}
key: check-packages

- name: Build the package
run: R CMD build .
- name: Install dependencies
shell: Rscript {0}
run: |
stuff <- read.dcf("DESCRIPTION")
stuff <- stuff[,intersect(colnames(stuff), c("Imports", "LinkingTo", "Suggests", "Depends"))]
deps <- sub(" .*", "", unlist(strsplit(stuff, ",\\s*"), use.names=FALSE))
BiocManager::install(deps)
- name: Test the package
run: |
tarball=$(ls *.tar.gz)
R CMD check --no-manual $tarball
- name: Build the package
run: R CMD build .

- name: Check the package
run: |
tarball=$(ls *.tar.gz)
R CMD check --no-manual $tarball

0 comments on commit 6404f5f

Please sign in to comment.