refactor: remove duplicate cache name constants in ag3.py #3232
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: tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| tests: | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| numpy-spec: | |
| # Keep this aligned with pyproject.toml: numpy = ">=2.0.2,<2.1" | |
| - "==2.0.2" # locked baseline | |
| - ">=2.0.2,<2.1" # latest allowed in declared range | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| - name: Setup python | |
| uses: ./.github/actions/setup-python | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install matrix NumPy version | |
| run: poetry run pip install --upgrade --no-deps "numpy${{ matrix.numpy-spec }}" | |
| - name: Verify NumPy version and spec | |
| env: | |
| NUMPY_SPEC: ${{ matrix.numpy-spec }} | |
| run: | | |
| poetry run python - <<'PY' | |
| import os | |
| import numpy | |
| from packaging.specifiers import SpecifierSet | |
| spec = SpecifierSet(os.environ["NUMPY_SPEC"]) | |
| version = numpy.__version__ | |
| if version not in spec: | |
| raise RuntimeError( | |
| f"NumPy version {version} does not satisfy matrix spec {spec}" | |
| ) | |
| print("NumPy version:", version, "| spec:", spec) | |
| PY | |
| - name: Run unit tests | |
| run: poetry run pytest -v tests --ignore tests/integration --typeguard-packages=malariagen_data,malariagen_data.anoph |