update readme #19
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: unit-tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install project (with dev deps) | |
| # setup-uv installs a uv-managed (externally-managed) interpreter, so | |
| # `--system` is rejected. Install into a project venv and invoke the | |
| # venv's binaries directly (avoids `uv run` re-syncing away the dev extra). | |
| # `--clear` recreates the venv even though setup-uv (with python-version) | |
| # already created a `.venv`, so `uv venv` doesn't error on the existing dir. | |
| run: | | |
| uv venv --python ${{ matrix.python-version }} --clear | |
| uv pip install -e ".[dev]" | |
| - name: Lint | |
| run: .venv/bin/ruff check src tests | |
| - name: Run unit tests | |
| # testpaths in pyproject.toml scopes this to tests/unit; integration | |
| # tests (which need a live cluster) are excluded here. | |
| run: .venv/bin/pytest tests/unit -q |