Skip to content

Commit 47dc8a9

Browse files
Restore complete Python CI matrix
1 parent 8959855 commit 47dc8a9

1 file changed

Lines changed: 47 additions & 9 deletions

File tree

.github/workflows/native-backend-ci.yml

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,61 @@ on:
55
push:
66

77
jobs:
8-
vignette-diagnostic:
9-
name: Vignette diagnostic
8+
native-backend:
9+
name: Python ${{ matrix.python-version }}
1010
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["3.11", "3.12", "3.13", "3.14"]
15+
1116
steps:
1217
- name: Check out repo
1318
uses: actions/checkout@v4
1419

1520
- name: Set up Python
1621
uses: actions/setup-python@v5
1722
with:
18-
python-version: "3.11"
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install build tools
26+
run: |
27+
python -m pip install -U pip
28+
# numpy pinned <2.5: the R parity cache keys hash test inputs generated via
29+
# multivariate_normal (LAPACK SVD). numpy 2.5.x bundles an OpenBLAS whose SVD
30+
# kernels differ on some runner CPUs, changing inputs bit-for-bit and causing
31+
# cache misses. Re-evaluate at the next full live-R cache regeneration.
32+
python -m pip install build scikit-build-core nanobind pytest ruff mypy "numpy<2.5" scipy
33+
python -m pip install hypothesis pytest-benchmark pytest-xdist
34+
35+
- name: Install package editable
36+
run: python -m pip install -e .
37+
38+
- name: Run native import smoke test
39+
run: python -c "import nns._nnscore as c; print(c.lpm(2.0, 0.0, [-2.0, -1.0, 0.5, 3.0]))"
1940

20-
- name: Install dependencies
41+
- name: Run invariants without Rscript
42+
run: python -m pytest -q tests/invariants
43+
44+
- name: Run parity from committed R cache
45+
run: NNS_R_CACHE_ONLY=1 python -m pytest -q tests/parity
46+
47+
- name: Run plotting color-fidelity tests
48+
run: python -m pytest -q tests/plotting
49+
50+
- name: Run vignette examples
2151
run: |
22-
python -m pip install -q -U pip
23-
python -m pip install -q build scikit-build-core nanobind pytest "numpy<2.5" scipy matplotlib hypothesis pytest-benchmark pytest-xdist
24-
python -m pip install -q -e .
52+
if [ -f tests/docs/test_vignette_examples.py ]; then
53+
python -m pytest -q tests/docs/test_vignette_examples.py
54+
else
55+
echo "No docs vignette test present; skipping."
56+
fi
57+
58+
- name: Run ruff
59+
run: ruff check .
60+
61+
- name: Run mypy
62+
run: mypy
2563

26-
- name: Run vignette examples with full tracebacks
27-
run: python -m pytest -vv -s tests/docs/test_vignette_examples.py
64+
- name: Build distributions
65+
run: python -m build

0 commit comments

Comments
 (0)