|
15 | 15 | - ".github/workflows/tests.yml" |
16 | 16 |
|
17 | 17 | jobs: |
| 18 | + generate-jobs: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + outputs: |
| 21 | + session: ${{ steps.set-matrix.outputs.session }} |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v6 |
| 24 | + - name: Install uv |
| 25 | + uses: astral-sh/setup-uv@v7 |
| 26 | + - id: set-matrix |
| 27 | + run: echo session=$(uvx nox@2025.11.12 --json -l | jq -c '[.[].session]') | tee --append $GITHUB_OUTPUT |
18 | 28 | tests: |
19 | | - name: ${{ matrix.session }} ${{ matrix.python }} / ${{ matrix.os }} |
20 | | - runs-on: ${{ matrix.os }} |
| 29 | + name: ${{ matrix.session }} |
| 30 | + needs: [generate-jobs] |
| 31 | + runs-on: ubuntu-latest |
21 | 32 | strategy: |
22 | 33 | fail-fast: false |
23 | 34 | matrix: |
24 | | - include: |
25 | | - - { python: "3.13", os: "ubuntu-latest", session: "pre-commit" } |
26 | | - - { python: "3.12", os: "ubuntu-latest", session: "mypy" } |
27 | | - - { python: "3.13", os: "ubuntu-latest", session: "mypy" } |
28 | | - - { python: "3.12", os: "ubuntu-latest", session: "tests" } |
29 | | - - { python: "3.13", os: "ubuntu-latest", session: "tests" } |
30 | | - - { python: "3.13", os: "ubuntu-latest", session: "typeguard" } |
31 | | - - { python: "3.13", os: "ubuntu-latest", session: "xdoctest" } |
32 | | - - { python: "3.13", os: "ubuntu-latest", session: "docs-build" } |
| 35 | + session: ${{ fromJson(needs.generate-jobs.outputs.session) }} |
33 | 36 |
|
34 | 37 | env: |
35 | 38 | NOXSESSION: ${{ matrix.session }} |
|
39 | 42 | steps: |
40 | 43 | - name: Check out the repository |
41 | 44 | uses: actions/checkout@v6 |
42 | | - |
43 | | - - name: Set up Python ${{ matrix.python }} |
44 | | - uses: actions/setup-python@v6.1.0 |
45 | | - with: |
46 | | - python-version: ${{ matrix.python }} |
47 | | - |
48 | 45 | - name: Install uv |
49 | 46 | uses: astral-sh/setup-uv@v7 |
50 | 47 | with: |
|
0 commit comments