From 2f963650aef97329480587dbf70158eeede5eed0 Mon Sep 17 00:00:00 2001 From: Mike Lin Date: Tue, 7 Nov 2023 16:40:02 -1000 Subject: [PATCH] [r] add r-dependency-check.yml nightly test of current release package (#769) #751. Following #763, add an analogous nightly workflow for R to install the current release version of `cellxgene.census` then run the unit tests, to verify compatibility with the most up-to-date dependency versions (without any dependency caching). --- .github/workflows/r-dependency-check.yml | 38 ++++++++++++++++++++++++ README.md | 1 + 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/r-dependency-check.yml diff --git a/.github/workflows/r-dependency-check.yml b/.github/workflows/r-dependency-check.yml new file mode 100644 index 000000000..9064d2849 --- /dev/null +++ b/.github/workflows/r-dependency-check.yml @@ -0,0 +1,38 @@ +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 + +jobs: + r-dependency-check: + name: r-dependency-check + + strategy: + 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 + - uses: r-lib/actions/setup-r@v2 + - 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"), type="source")' + 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 diff --git a/README.md b/README.md index f4edd2a88..0a76f14c8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![codecov](https://codecov.io/gh/chanzuckerberg/cellxgene-census/branch/main/graph/badge.svg?token=byX1pyDlc9)](https://codecov.io/gh/chanzuckerberg/cellxgene-census) [![Python dependency checks](https://github.com/chanzuckerberg/cellxgene-census/actions/workflows/py-dependency-check.yml/badge.svg)](https://github.com/chanzuckerberg/cellxgene-census/actions/workflows/py-dependency-check.yml) +[![R dependency checks](https://github.com/chanzuckerberg/cellxgene-census/actions/workflows/r-dependency-check.yml/badge.svg)](https://github.com/chanzuckerberg/cellxgene-census/actions/workflows/r-dependency-check.yml) [![LTS compat checks](https://github.com/chanzuckerberg/cellxgene-census/actions/workflows/lts-compat-check.yml/badge.svg)](https://github.com/chanzuckerberg/cellxgene-census/actions/workflows/lts-compat-check.yml) # CZ CELLxGENE Discover Census