Skip to content

Testing the new versions #265

Testing the new versions

Testing the new versions #265

Workflow file for this run

name: Unit Tests
on:
push:
branches-ignore:
- 'test_deploy'
pull_request:
branches:
- '*'
concurrency:
group: ci-tests-${{ github.ref }}-1
# main should run through entire queue of commits for debugging
cancel-in-progress: ${{ github.ref_name != 'main'}}
jobs:
run_tester:
runs-on: ${{ matrix.config.os }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
env:
RENV_PATHS_ROOT: ~/.local/share/renv
strategy:
fail-fast: false
matrix:
config:
- {name: '3.13', os: ubuntu-latest, python: '3.13', r: 'release'}
- {name: '3.12', os: ubuntu-latest, python: '3.12', r: 'release'}
- {name: '3.11', os: ubuntu-latest, python: '3.11', r: 'release'}
- {name: '3.10', os: ubuntu-latest, python: '3.10', r: 'release'}
- {name: '3.9', os: ubuntu-latest, python: '3.9', r: 'release'}
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -qq
sudo apt-get install -y pandoc gfortran libblas-dev liblapack-dev libedit-dev llvm-dev libcurl4-openssl-dev ffmpeg libhdf5-dev libfribidi-dev libharfbuzz-dev
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config.python }}
- name: Set up R
id: setup-r
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
- name: Cache Python packages
uses: pat-s/always-upload-cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{runner.os}}-pip-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
restore-keys: ${{runner.os}}-pip-${{ env.pythonLocation }}-
- name: Cache R packages
uses: pat-s/always-upload-cache@v2
if: startsWith(runner.os, 'Linux')
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-R-${{ steps.setup-r.outputs.installed-r-version }}-${{ hashFiles('DESCRIPTION') }}
restore-keys: |
${{ runner.os }}-R-${{ steps.setup-r.outputs.installed-r-version }}-
- name: Install python tools
run: |
python -m pip install --upgrade pip
pip install --upgrade wheel setuptools
- name: Set up rpy2
run: |
pip install rpy2
echo "LD_LIBRARY_PATH=$(python -m rpy2.situation LD_LIBRARY_PATH):${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- name: Install scprep
id: install-python-packages
run: |
pip install --upgrade .[test]
python -c "import scprep"
- name: Install R packages
id: install-r-packages
run: |
install.packages(c("BiocManager", "devtools"))
BiocManager::install(c("splatter", "slingshot"))
devtools::install_github("dynverse/dyngen")
devtools::install_github("dynverse/dynwrap")
shell: Rscript {0}
- name: Run tests
run: nose2 -vvv
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
run: |
coveralls
- name: Upload check results on fail
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.name }}_results
path: check