99
1010jobs :
1111 test :
12- name : Test (${{ matrix.tox_env }})
13- runs-on : ubuntu-latest
12+ name : Python ${{ matrix.python-version }} – ${{ matrix.tox_env }}
1413
1514 strategy :
1615 fail-fast : false
1716 matrix :
18- tox_env : [minimal, qa]
17+ include :
18+ - python-version : " 3.7"
19+ # pin older os as latest does not support v3.7
20+ runs-on : ubuntu-22.04
21+ tox_env : qa
22+ - python-version : " 3.8"
23+ # pin older os as latest does not support v3.8
24+ runs-on : ubuntu-22.04
25+ tox_env : qa
26+ - python-version : " 3.9"
27+ runs-on : ubuntu-latest
28+ tox_env : qa
29+ - python-version : " 3.10"
30+ runs-on : ubuntu-latest
31+ tox_env : qa
32+ - python-version : " 3.11"
33+ runs-on : ubuntu-latest
34+ tox_env : qa
35+ - python-version : " 3.12"
36+ runs-on : ubuntu-latest
37+ tox_env : qa
38+ - python-version : " 3.12"
39+ runs-on : ubuntu-latest
40+ tox_env : minimal
1941
2042 steps :
2143 - uses : actions/checkout@v4
2244
23- - name : Set up Python
45+ - name : Set up Python ${{ matrix.python-version }}
2446 uses : actions/setup-python@v5
2547 with :
26- python-version : " 3.12 "
48+ python-version : ${{ matrix.python-version }}
2749
2850 - name : Install tox
2951 run : python -m pip install tox
3052
3153 - name : Run tox for ${{ matrix.tox_env }}
3254 run : tox -e ${{ matrix.tox_env }}
3355
56+ - name : Debug coverage location
57+ run : |
58+ find . -name ".coverage*" -exec ls -l {} \;
59+
3460 - name : Upload coverage report
3561 if : always()
3662 uses : actions/upload-artifact@v4
3763 with :
3864 name : coverage-${{ matrix.tox_env }}
39- path : coverage.xml
65+ path : . coverage-reports/.coverage.*
4066
4167 codecov :
4268 name : Upload merged coverage to Codecov
@@ -52,15 +78,24 @@ jobs:
5278 with :
5379 path : coverage-artifacts
5480
55- - name : Combine coverage files
81+ - name : Combine and generate coverage
5682 run : |
5783 pip install coverage
58- coverage combine coverage-artifacts/**/coverage.xml
84+ mkdir -p .coverage-reports
85+ find coverage-artifacts -name '.coverage.*' -exec cp {} .coverage-reports/ \;
86+ coverage combine .coverage-reports
87+ coverage report
5988 coverage xml
6089
90+ - name : Upload final Coverage XML
91+ uses : actions/upload-artifact@v4
92+ with :
93+ name : combined-coverage
94+ path : coverage.xml
95+
6196 - name : Upload to Codecov
6297 uses : codecov/codecov-action@v4
6398 with :
6499 token : ${{ secrets.CODECOV_TOKEN }}
65- file : coverage.xml
66100 fail_ci_if_error : false
101+
0 commit comments