Skip to content

[pre-commit.ci] pre-commit autoupdate (#200) #291

[pre-commit.ci] pre-commit autoupdate (#200)

[pre-commit.ci] pre-commit autoupdate (#200) #291

Workflow file for this run

name: Unit Tests
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -e {0} # -e to fail on error
jobs:
run_tester:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
env:
RENV_PATHS_ROOT: ~/.local/share/renv
strategy:
fail-fast: false
matrix:
config:
- python: "3.12"
r: release
bioc: "3.19"
- python: "3.9"
r: oldrel
bioc: "3.18"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none
- name: Install system dependencies
if: runner.os == 'Linux'
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: pandoc gfortran libblas-dev liblapack-dev libedit-dev llvm-dev libcurl4-openssl-dev ffmpeg libhdf5-dev
version: 1.0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config.python }}
cache: pip
- id: setup-r
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true # compiled packages from posit
- name: Install python tools
run: |
python -m pip install --upgrade pip wheel
pip install --upgrade build
- name: Set up rpy2
run: |
pip install rpy2
echo "LD_LIBRARY_PATH=$(python -m rpy2.situation LD_LIBRARY_PATH):${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1 # increment to bust cache
packages: |
bioc::SingleCellExperiment
bioc::scRNAseq
${{ matrix.config.r == 'oldrel' && 'cran::[email protected]' || '' }}
env:
R_BIOC_VERSION: ${{ matrix.config.bioc }}
- name: Install anndata2ri
run: |
python -m build --wheel
pip install $(ls -1 dist/anndata2ri*.whl)[test]
python -c "import anndata2ri"
- name: Run tests
run: pytest --verbose --color=yes