Add CI: pytest across 3.11-3.13, ruff, mypy
- SHA
3465d3c4a21a3eb2c17abf7a7b7d4697e091775f- Parents
-
51bdf4d - Tree
6d14ad5
3465d3c
3465d3c4a21a3eb2c17abf7a7b7d4697e091775f51bdf4d
6d14ad5| Status | File | + | - |
|---|---|---|---|
| A |
.github/workflows/ci.yml
|
44 | 0 |
.github/workflows/ci.ymladded@@ -0,0 +1,44 @@ | ||
| 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 | + | |
| 43 | + - name: Mypy | |
| 44 | + run: uv run mypy src | |