Debian Codegraph @

.github/workflows/tests.yml

raw symbols SCIP
1 # For documentation on GitHub Actions Workflows, see:
2 # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
3 name: Tests
4 on:
5 pull_request:
6 types: [opened, synchronize, reopened]
7 push:
8 branches: [main]
9
10 jobs:
11 tests:
12 strategy:
13 matrix:
14 os: [ubuntu-latest, macos-latest, windows-latest]
15 python-version: ["3.11", "3.12", "3.13", "3.14", "3.14t", "3.15-dev"]
16 fail-fast: false
17
18 runs-on: ${{ matrix.os }}
19 defaults:
20 run:
21 shell: bash
22 steps:
23 - name: Check out
24 uses: actions/[email protected]
25 with:
26 fetch-depth: 0 # Needed for setuptools_scm to work correctly
27 - name: Install uv
28 uses: astral-sh/setup-uv@v7
29
30 - name: Set up Python ${{ matrix.python-version }}
31 uses: actions/setup-python@v7
32 with:
33 python-version: ${{ matrix.python-version }}
34 allow-prereleases: true
35 - name: Install the project
36 run: uv sync --all-extras --dev
37
38 - name: Run tests
39 run: uv run python -Xutf8 -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests
40
41 - name: Upload test results to Codecov
42 if: ${{ !cancelled() }}
43 uses: codecov/codecov-action@v7
44 with:
45 flags: python${{ matrix.python-version }}
46 name: codecov-umbrella-test-results
47 report_type: test_results
48 token: ${{ secrets.CODECOV_TOKEN }}
49 - name: Upload coverage to Codecov
50 uses: codecov/codecov-action@v7
51 with:
52 env_vars: OS,PYTHON
53 fail_ci_if_error: true
54 flags: unittests
55 name: codecov-umbrella
56 token: ${{ secrets.CODECOV_TOKEN }}
57 verbose: true