R dependency checks #395
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
name: R dependency checks | |
# This workflow is intended to check that the latest release of the cellxgene.census R package | |
# continues to function correctly using the latest upstream dependencies. | |
on: | |
schedule: | |
- cron: "30 1 * * *" | |
workflow_dispatch: # used for debugging or manual validation | |
env: | |
CELLXGENE_CENSUS_USERAGENT: "CZI-test" | |
jobs: | |
r-dependency-check: | |
name: r-dependency-check | |
strategy: | |
fail-fast: false # don't fail-fast, as errors are often specific to a single cell in the matrix | |
matrix: | |
os: [ubuntu-22.04, macos-latest] | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: install OS dependencies | |
if: matrix.os == 'ubuntu-22.04' | |
run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libcairo2-dev libglpk-dev | |
- uses: r-lib/actions/setup-r@v2 | |
- name: install packages (macOS) | |
if: matrix.os == 'macos-latest' | |
run: Rscript -e 'install.packages(c("igraph"), type="binary")' | |
- name: install cellxgene.census and dependencies | |
# This should follow our user-facing instructions to install cellxgene.census. | |
run: | | |
Rscript -e 'install.packages(c("cellxgene.census", "Seurat", "BiocManager", "testthat"), repos=c("https://chanzuckerberg.r-universe.dev", "https://cloud.r-project.org"))' | |
Rscript -e 'BiocManager::install("SingleCellExperiment")' | |
- name: run unit tests | |
# [re-]fetch the cellxgene.census source package which includes the unit test code to run | |
run: | | |
set -ex | |
Rscript -e 'download.packages("cellxgene.census", destdir=".", repos="https://chanzuckerberg.r-universe.dev", type="source")' | |
tar zxf cellxgene.census_*.tar.gz | |
cd cellxgene.census/tests | |
Rscript testthat.R |