99 - main
1010
1111jobs :
12+ get-tox-envlist :
13+ runs-on : ubuntu-latest
14+ outputs :
15+ envlist : ${{ steps.generate-tox-envlist.outputs.envlist }}
16+ steps :
17+ - uses : actions/checkout@v3
18+ - run : python -m pip install tox tox-gh-matrix
19+ - id : generate-tox-envlist
20+ run : python -m tox --gh-matrix
21+
1222 build :
13- name : build (Python ${{ matrix.python-version }})
23+ name : Test ${{ matrix.tox.name }}
1424 runs-on : ubuntu-latest
25+ needs : get-tox-envlist
1526 strategy :
1627 fail-fast : false
1728 matrix :
18- python-version : ['3.8', '3.9', '3.10', '3.11', '3.12']
29+ tox : ${{ fromJSON(needs.generate-tox-envlist.outputs.envlist) }}
1930
2031 # Service containers to run with `container-job`
2132 services :
@@ -36,22 +47,21 @@ jobs:
3647 steps :
3748 - uses : actions/checkout@v2
3849
39- - name : Set up Python ${{ matrix.python- version }}
40- uses : actions/setup-python@v2
50+ - name : Setup Python ${{ matrix.tox. python. version }}
51+ uses : actions/setup-python@v4
4152 with :
42- python-version : ${{ matrix.python-version }}
53+ python-version : ${{ matrix.tox. python.spec }}
4354
4455 - name : Install dependencies
4556 run : |
4657 python -m pip install --upgrade pip
47- python -m pip install --upgrade tox tox-gh-actions
58+ python -m pip install --upgrade tox
4859
4960 - name : Tox tests
50- run : |
51- tox -v
61+ run : python -m tox -v -e ${{ matrix.tox.name }}
5262
5363 - name : Install codecov
5464 run : python -m pip install codecov
5565
5666 - name : Upload coverage
57- run : python -m codecov --name "Python ${{ matrix.python-version }}"
67+ run : python -m codecov --name "Python ${{ matrix.tox. python.spec }}"
0 commit comments