| 1 | name: CI |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [trunk] |
| 6 | pull_request: |
| 7 | branches: [trunk] |
| 8 | |
| 9 | jobs: |
| 10 | test: |
| 11 | runs-on: ubuntu-latest |
| 12 | strategy: |
| 13 | matrix: |
| 14 | python-version: ["3.11", "3.12", "3.13"] |
| 15 | |
| 16 | steps: |
| 17 | - uses: actions/checkout@v4 |
| 18 | |
| 19 | - uses: astral-sh/setup-uv@v4 |
| 20 | |
| 21 | - name: Set up Python ${{ matrix.python-version }} |
| 22 | run: uv python install ${{ matrix.python-version }} |
| 23 | |
| 24 | - name: Install dependencies |
| 25 | run: uv sync --extra dev --python ${{ matrix.python-version }} |
| 26 | |
| 27 | - name: Run tests |
| 28 | run: uv run --python ${{ matrix.python-version }} pytest tests/ -q |
| 29 | |
| 30 | lint: |
| 31 | runs-on: ubuntu-latest |
| 32 | steps: |
| 33 | - uses: actions/checkout@v4 |
| 34 | |
| 35 | - uses: astral-sh/setup-uv@v4 |
| 36 | |
| 37 | - name: Install dependencies |
| 38 | run: uv sync --extra dev |
| 39 | |
| 40 | - name: Ruff check |
| 41 | run: uv run ruff check src tests |
| 42 |