Inspect R API update 459164e2bb14557e44f0f2b4b448432c317afbbf #241
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Native backend CI | |
| on: | |
| pull_request: | |
| push: | |
| jobs: | |
| native-backend: | |
| name: Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install build tools | |
| run: | | |
| python -m pip install -U pip | |
| python -m pip install build scikit-build-core nanobind pytest ruff mypy numpy scipy | |
| python -m pip install hypothesis pytest-benchmark pytest-xdist | |
| - name: Install package editable | |
| run: python -m pip install -e . | |
| - name: Run native import smoke test | |
| run: python -c "import nns._nnscore as c; print(c.lpm(2.0, 0.0, [-2.0, -1.0, 0.5, 3.0]))" | |
| - name: Run invariants without Rscript | |
| run: python -m pytest -q tests/invariants | |
| - name: Run parity from committed R cache | |
| run: NNS_R_CACHE_ONLY=1 python -m pytest -q tests/parity | |
| - name: Run plotting color-fidelity tests | |
| run: python -m pytest -q tests/plotting | |
| - name: Run vignette examples | |
| run: | | |
| if [ -f tests/docs/test_vignette_examples.py ]; then | |
| python -m pytest -q tests/docs/test_vignette_examples.py | |
| else | |
| echo "No docs vignette test present; skipping." | |
| fi | |
| - name: Run ruff | |
| run: ruff check . | |
| - name: Run mypy | |
| run: mypy | |
| - name: Build distributions | |
| run: python -m build |