Skip to content

🧱 static integration testing #40

🧱 static integration testing

🧱 static integration testing #40

Workflow file for this run

name: CI
permissions: read-all
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# Many color libraries just need this to be set to any value, but at least
# one distinguishes color depth, where "3" -> "256-bit color".
FORCE_COLOR: 3
jobs:
lint:
name: lint
runs-on: ubuntu-latest
env:
UV_FROZEN: 1
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install uv
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb
- name: ruff
run: |
uv run ruff check --output-format=github
uv run ruff format --check
- name: mypy
run: uv run mypy --tb --no-incremental --cache-dir=/dev/null src
# TODO: (based)pyright
test_runtime:
name: runtime tests
runs-on: ${{ matrix.runs-on }}
env:
UV_FROZEN: 1
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
runs-on: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install uv
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb
with:
python-version: ${{ matrix.python-version }}
- name: Test package
run: >-
uv run --group=test_runtime
pytest --cov --cov-report=xml --cov-report=term --durations=20
- name: Upload coverage report
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24
with:
token: ${{ secrets.CODECOV_TOKEN }}
test_integration_numpy:
name: integration tests (numpy)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
numpy-version: ["1.25.0", "1.25.2", "1.26.4", "2.0.2", "2.1.3", "2.2.6", "2.3.1"]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb
with:
python-version: "3.11"
- name: (DEBUG) print numpy version # TODO
run: >
uv run --no-editable --group=mypy --with="numpy==${{ matrix.numpy-version }}"
python -c "import numpy; print(numpy.__version__)"
- name: mypy
run: >
uv run --no-editable --group=mypy --with="numpy==${{ matrix.numpy-version }}"
mypy --tb --no-incremental --cache-dir=/dev/null tests/integration/test_numpy.pyi
# TODO: (based)pyright
# TODO: integration tests for other libs