Regenerate R parity cache for NNS 13.2 #843
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 | |
| # pull_request covers every branch with an open PR; push is limited to main so | |
| # a PR-branch push does not run the identical matrix twice (once per event). | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| # A superseded push to the same ref cancels the in-flight run. | |
| concurrency: | |
| group: native-backend-ci-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| 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<2.5" 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 property tests | |
| run: python -m pytest -q tests/property | |
| - 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 |