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 : |
19+ python -m pip install --upgrade pip
20+ python -m pip install tox tox-gh-matrix
21+ - id : generate-tox-envlist
22+ run : python -m tox --gh-matrix
23+
1224 build :
13- name : build (Python ${{ matrix.python-version }})
25+ name : Test ${{ matrix.tox.name }}
1426 runs-on : ubuntu-latest
27+ needs : get-tox-envlist
1528 strategy :
1629 fail-fast : false
1730 matrix :
18- python-version : ['3.8', '3.9', '3.10', '3.11', '3.12']
31+ tox : ${{ fromJSON(needs.get-tox-envlist.outputs.envlist) }}
1932
2033 # Service containers to run with `container-job`
2134 services :
@@ -36,22 +49,21 @@ jobs:
3649 steps :
3750 - uses : actions/checkout@v2
3851
39- - name : Set up Python ${{ matrix.python- version }}
40- uses : actions/setup-python@v2
52+ - name : Setup Python ${{ matrix.tox. python. version }}
53+ uses : actions/setup-python@v4
4154 with :
42- python-version : ${{ matrix.python-version }}
55+ python-version : ${{ matrix.tox. python.spec }}
4356
4457 - name : Install dependencies
4558 run : |
4659 python -m pip install --upgrade pip
47- python -m pip install --upgrade tox tox-gh-actions
60+ python -m pip install --upgrade tox
4861
4962 - name : Tox tests
50- run : |
51- tox -v
63+ run : python -m tox -v -e ${{ matrix.tox.name }}
5264
5365 - name : Install codecov
5466 run : python -m pip install codecov
5567
5668 - name : Upload coverage
57- run : python -m codecov --name "Python ${{ matrix.python-version }}"
69+ run : python -m codecov --name "Python ${{ matrix.tox. python.spec }}"
0 commit comments