Skip to content

Merge branch 'master' of git.bioconductor.org:packages/SingleR #47

Merge branch 'master' of git.bioconductor.org:packages/SingleR

Merge branch 'master' of git.bioconductor.org:packages/SingleR #47

Workflow file for this run

on: [push]
name: R-CMD-check
jobs:
build-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
container: ${{ matrix.config.cont }}
## Environment variables unique to this job.
strategy:
fail-fast: false
matrix:
config:
- { os: ubuntu-latest, r: '4.3', bioc: '3.18', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
- { os: macOS-latest, r: '4.3', bioc: '3.18'}
## Check https://github.com/r-lib/actions/tree/master/examples
## for examples using the http-user-agent
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
NOT_CRAN: true
TZ: UTC
GITHUB_PAT: ${{ secrets.BEACHMAT_PAT }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
## For Macs - none of this is required for the Linux containers.
- name: Setup R from r-lib
if: runner.os != 'Linux'
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
- name: Setup pandoc from r-lib
if: runner.os != 'Linux'
uses: r-lib/actions/setup-pandoc@v2
- name: Install BiocManager with the right version
if: runner.os != 'Linux'
run: |
install.packages("BiocManager")
BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE, force = TRUE)
shell: Rscript {0}
- name: Install remotes to get beachmat
if: runner.os != 'Linux'
run: |
BiocManager::install("remotes")
shell: Rscript {0}
- name: Install macOS system dependencies
if: matrix.config.os == 'macOS-latest'
run: |
## Enable installing XML from source if needed
brew install libxml2
echo "XML_CONFIG=/usr/local/opt/libxml2/bin/xml2-config" >> $GITHUB_ENV
- name: Determine the package directory
run: R --no-echo -e "cat(paste0('R_PKG_DIR=', .libPaths()[1], '\n'))" >> $GITHUB_ENV
- name: Restore the package directory
uses: actions/cache@v3
with:
path: ${{ env.R_PKG_DIR }}
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-${{ hashFiles('.github/dependencies.rds') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-
- name: Install R package dependencies
shell: Rscript {0}
run: |
deets <- read.dcf("DESCRIPTION")
installs <- unlist(strsplit(deets[,c("Imports", "Depends", "Suggests", "LinkingTo")], ",\\s+"), use.names=FALSE)
BiocManager::install(installs)
BiocManager::install("BiocCheck")
saveRDS(file=".github/dependencies.rds", installs)
- name: Determine the Hub directories
run: R --no-echo -e "cat(paste0('EXPERIMENT_HUB_DIR=', suppressMessages(ExperimentHub::getExperimentHubOption('CACHE')), '\nANNOTATION_HUB_DIR=', suppressMessages(AnnotationHub::getAnnotationHubOption('CACHE')), '\n'))" >> $GITHUB_ENV
- name: Restore the ExperimentHub directory
uses: actions/cache@v3
with:
path: ${{ env.EXPERIMENT_HUB_DIR }}
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-ExperimentHub-${{ hashFiles('vignettes/*.Rmd') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-ExperimentHub-
- name: Restore the AnnotationHub directory
uses: actions/cache@v3
with:
path: ${{ env.ANNOTATION_HUB_DIR }}
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-AnnotationHub-${{ hashFiles('vignettes/*.Rmd') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-AnnotationHub-
- name: Run CMD build
run: |
R CMD build .
- name: Run CMD check
run: |
tarball=$(ls | grep "SingleR_.*.tar.gz")
R CMD check --no-manual $tarball
- name: Reveal testthat details
run: find . -name testthat.Rout -exec cat '{}' ';'
- name: Run BiocCheck
run: |
BiocCheck::BiocCheck(
dir('.', 'tar.gz$', full.names = TRUE),
`quit-with-status` = FALSE,
`no-check-R-ver` = TRUE,
`no-check-bioc-help` = TRUE
)
shell: Rscript {0}