|
name: CI |
|
|
|
on: |
|
push: |
|
branches: [ '**' ] |
|
pull_request: |
|
branches: [ '**' ] |
|
|
|
jobs: |
|
build: |
|
runs-on: ubuntu-latest |
|
strategy: |
|
matrix: |
|
python-version: ['3.10', '3.11', '3.12'] |
|
|
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@v4 |
|
|
|
- name: Set up uv (Python ${{ matrix.python-version }}) |
|
uses: astral-sh/setup-uv@v10.0.1 |
|
with: |
|
enable-cache: true |
|
python-version: ${{ matrix.python-version }} |
|
|
|
- name: Install dependencies |
|
run: uv sync --locked --group dev |
|
|
|
- name: Lint (Ruff) |
|
run: uv run ruff check . |
|
|
|
- name: Format check (Black) |
|
run: uv run black --check src examples tests |
|
|
|
- name: Type check (MyPy) |
|
run: uv run mypy |
|
|
|
# Produces the sdist and wheel through the setuptools backend. Note |
|
# this builds but does not install them, so the previous non-editable |
|
# install smoke test is not replaced. |
|
- name: Build package |
|
run: uv build |
|
|
|
- name: Run tests |
|
run: uv run pytest -q |