-
Notifications
You must be signed in to change notification settings - Fork 16
83 lines (69 loc) · 2.19 KB
/
run_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Unit Tests
on:
push:
branches:
- main
pull_request:
branches:
- "*"
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: ${{ 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.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 }
- { name: "3.8", os: ubuntu-latest, python: "3.8", r: oldrel }
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- 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
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python }}
cache: pip
- name: Set up R
id: setup-r
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
- 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
- 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