| 1 |
name: Test |
| 2 |
|
| 3 |
on: |
| 4 |
pull_request: |
| 5 |
branches: [main] |
| 6 |
|
| 7 |
push: |
| 8 |
branches: [main] |
| 9 |
|
| 10 |
jobs: |
| 11 |
test: |
| 12 |
name: Test |
| 13 |
runs-on: ubuntu-latest |
| 14 |
|
| 15 |
steps: |
| 16 |
- uses: actions/checkout@v4 |
| 17 |
|
| 18 |
- name: Install uv |
| 19 |
uses: astral-sh/setup-uv@v5 |
| 20 |
with: |
| 21 |
version: "0.7.3" |
| 22 |
enable-cache: true |
| 23 |
cache-dependency-glob: "uv.lock" |
| 24 |
|
| 25 |
- name: Set up Python |
| 26 |
run: uv python install 3.12 |
| 27 |
|
| 28 |
- name: Install dependencies |
| 29 |
run: uv sync --frozen --all-extras --dev |
| 30 |
|
| 31 |
- name: Run tests |
| 32 |
run: uv run pytest --cov --junitxml=junit.xml -o junit_family=legacy |
| 33 |
|
| 34 |
- name: Upload test results to Codecov |
| 35 |
if: ${{ !cancelled() }} |
| 36 |
uses: codecov/test-results-action@v1 |
| 37 |
with: |
| 38 |
token: ${{ secrets.CODECOV_TOKEN }} |
| 39 |
|
| 40 |
- name: Upload coverage reports to Codecov |
| 41 |
uses: codecov/codecov-action@v5 |
| 42 |
with: |
| 43 |
token: ${{ secrets.CODECOV_TOKEN }} |
| 44 |
|
| 45 |
- name: Run linters |
| 46 |
run: uvx ruff check . |