fix older numpy compat issues with numpy-typing-compat
#950
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: CI | |
permissions: read-all | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
UV_LOCKED: 1 | |
jobs: | |
lint: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: repo review | |
uses: scientific-python/[email protected] | |
with: | |
plugins: sp-repo-review | |
- name: dprint | |
uses: dprint/[email protected] | |
- name: typos | |
uses: crate-ci/[email protected] | |
- uses: astral-sh/[email protected] | |
with: | |
python-version: "3.13" | |
- name: ruff check | |
run: uv run ruff check --output-format=github | |
- name: ruff format | |
run: uv run ruff format --check | |
- name: basedpyright --verifytypes | |
run: uv run basedpyright --ignoreexternal --verifytypes optype | |
typecheck: | |
timeout-minutes: 5 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
np: ["1.25", "2.0", "2.1", "2.2", "2.3"] | |
py: ["3.11"] | |
steps: | |
- uses: actions/[email protected] | |
- uses: astral-sh/[email protected] | |
with: | |
activate-environment: true | |
python-version: ${{ matrix.py }} | |
- name: uv sync | |
run: uv sync --no-editable | |
- name: install deps | |
run: > | |
uv pip install | |
numpy==${{ matrix.np }}.* | |
numpy-typing-compat==${{ matrix.np }}.* | |
- name: basedpyright | |
run: basedpyright | |
# NOTE: mypy ignores `uv run --with=...` (and `--isolated` does not help) | |
- name: mypy | |
run: mypy --no-incremental --cache-dir=/dev/null . | |
test: | |
timeout-minutes: 10 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
py: ["3.11", "3.13", "3.14"] | |
np: ["1.25", "2.3"] | |
exclude: | |
- py: "3.13" | |
np: "1.25" | |
- py: "3.14" | |
np: "1.25" | |
- os: windows-latest | |
py: "3.14" | |
steps: | |
- uses: actions/[email protected] | |
- uses: astral-sh/[email protected] | |
with: | |
python-version: ${{ matrix.py }} | |
- name: pytest | |
run: >- | |
uv run | |
--with="numpy==${{ matrix.np }}.*" | |
--with="numpy-typing-compat==${{ matrix.np }}.*" | |
pytest |