chore: release main #723
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| # ─── Lint & format ────────────────────────────────────────────────────────── | |
| lint: | |
| name: Lint & format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: uv lock | |
| - run: uv sync --all-packages | |
| - run: uv run ruff check . | |
| - run: uv run ruff format --check . | |
| # ─── Setup ────────────────────────────────────────────────────────────────── | |
| setup: | |
| name: Install & sync | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: uv lock | |
| - run: uv sync --all-packages | |
| # ─── Type check ───────────────────────────────────────────────────────────── | |
| typecheck: | |
| name: Type check | |
| needs: setup | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: uv lock | |
| - run: uv sync --all-packages | |
| # Not bare `mypy .`: the per-package `tests/conftest.py` files collide under mypy's module | |
| # resolution, which aborts the run before anything is checked. `make typecheck` runs this | |
| # same command. | |
| - run: uv run mypy packages/*/src | |
| # ─── Test ─────────────────────────────────────────────────────────────────── | |
| test: | |
| name: Tests | |
| needs: setup | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: uv lock | |
| - run: uv sync --all-packages | |
| # Not `packages/*/tests`: that glob silently skips the repo-root `tests/` directory, which | |
| # holds the invariants no single package can own. `make test` runs this same bare command. | |
| - run: uv run pytest | |
| # ─── Build ──────────────────────────────────────────────────────────────── | |
| build: | |
| name: Build all packages | |
| needs: [lint, typecheck, test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: uv lock | |
| - run: uv sync --all-packages | |
| - name: Build all packages | |
| run: | | |
| for pkg in packages/*/; do | |
| echo "Building $pkg..." | |
| (cd "$pkg" && uv build --out-dir dist) | |
| done |