| 1 | name: Test |
| 2 | |
| 3 | on: [push, pull_request, workflow_dispatch] |
| 4 | |
| 5 | permissions: {} |
| 6 | |
| 7 | env: |
| 8 | FORCE_COLOR: 1 |
| 9 | PIP_DISABLE_PIP_VERSION_CHECK: 1 |
| 10 | |
| 11 | jobs: |
| 12 | test: |
| 13 | runs-on: ${{ matrix.os }} |
| 14 | strategy: |
| 15 | fail-fast: false |
| 16 | matrix: |
| 17 | python-version: |
| 18 | - "pypy3.11" |
| 19 | - "3.15t" |
| 20 | - "3.15" |
| 21 | - "3.14t" |
| 22 | - "3.14" |
| 23 | - "3.13t" |
| 24 | - "3.13" |
| 25 | - "3.12" |
| 26 | - "3.11" |
| 27 | - "3.10" |
| 28 | os: [windows-latest, macos-latest, ubuntu-latest] |
| 29 | |
| 30 | steps: |
| 31 | - uses: actions/checkout@v5 |
| 32 | with: |
| 33 | persist-credentials: false |
| 34 | |
| 35 | - name: Set up Python ${{ matrix.python-version }} |
| 36 | uses: actions/setup-python@v6 |
| 37 | with: |
| 38 | python-version: ${{ matrix.python-version }} |
| 39 | allow-prereleases: true |
| 40 | |
| 41 | - name: Set PYTHON_GIL |
| 42 | if: endsWith(matrix.python-version, 't') |
| 43 | run: | |
| 44 | echo "PYTHON_GIL=0" >> "$GITHUB_ENV" |
| 45 | |
| 46 | - name: Install uv |
| 47 | uses: astral-sh/setup-uv@v7 |
| 48 | |
| 49 | - name: Tox tests |
| 50 | run: | |
| 51 | uvx --python ${{ matrix.python-version }} --with tox-uv tox -e py |
| 52 | |
| 53 | - name: Upload coverage |
| 54 | uses: codecov/codecov-action@v5 |
| 55 | with: |
| 56 | flags: ${{ matrix.os }} |
| 57 | name: ${{ matrix.os }} Python ${{ matrix.python-version }} |
| 58 | |
| 59 | success: |
| 60 | needs: test |
| 61 | runs-on: ubuntu-latest |
| 62 | name: Test successful |
| 63 | steps: |
| 64 | - name: Success |
| 65 | run: echo Test successful |