@@ -219,43 +219,46 @@ jobs:
219219
220220 - run : python -m tox -e ${{ matrix.toxenv }} ${{ matrix.toxargs }} -- ${{ matrix.pytest_flag }} ${{ matrix.posargs }}
221221
222- - if : ${{ (success() || failure() ) && matrix.artifact-path != '' }}
222+ - if : ${{ !cancelled( ) && matrix.artifact-path != '' }}
223223 uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
224224 with :
225225 name : ${{ matrix.artifact-name }}
226226 path : ${{ matrix.artifact-path }}
227227
228- - if : ${{ (success() || failure() ) && matrix.pytest-results-summary == 'true' && matrix.pytest == 'true' }}
228+ - if : ${{ !cancelled( ) && matrix.pytest-results-summary == 'true' && matrix.pytest == 'true' }}
229229 uses : test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
230230 with :
231231 paths : " **/results.xml"
232232
233233 - name : Upload to Codecov
234234 # Even if tox fails, upload coverage
235- if : ${{ (success() || failure() ) && contains(matrix.coverage, 'codecov') && matrix.pytest == 'true' }}
235+ if : ${{ !cancelled( ) && contains(matrix.coverage, 'codecov') && matrix.pytest == 'true' }}
236236 uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
237237 with :
238238 token : ${{ secrets.CODECOV_TOKEN }}
239239
240240 - name : Upload coverage data to GitHub
241- if : ${{ (success() || failure() ) && contains(matrix.coverage, 'github') && matrix.pytest == 'true' }}
242- uses : actions/upload-artifact@v4
241+ if : ${{ !cancelled( ) && contains(matrix.coverage, 'github') && matrix.pytest == 'true' }}
242+ uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
243243 with :
244244 name : .coverage.${{ github.sha }}-${{ runner.os }}-${{ runner.arch }}-${{ matrix.toxenv }}
245- path : " ${{ github.workspace }}/**/.coverage"
245+ path : " ${{ github.workspace }}/**/.coverage*"
246+ if-no-files-found : error
247+ include-hidden-files : true
248+
246249
247250 report_overall_test_coverage :
248251 needs : [ tox ]
249252 if : always()
250253 name : report overall test coverage
251254 runs-on : ubuntu-latest
252255 steps :
253- - uses : actions/checkout@v4
256+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
254257 with :
255258 lfs : true
256259 submodules : ${{ inputs.submodules }}
257260 ref : ${{ inputs.checkout_ref }}
258- - uses : actions/download-artifact@v4
261+ - uses : actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
259262 with :
260263 pattern : .coverage.*
261264 merge-multiple : true
@@ -264,17 +267,20 @@ jobs:
264267 [ "$(ls -A .coverage*)" ] && exit 0 || exit 1
265268 continue-on-error : true
266269 - if : steps.check_downloaded_files.outcome == 'success'
267- uses : actions/setup-python@v5
270+ uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
268271 with :
269272 python-version : " 3.12"
270273 - if : steps.check_downloaded_files.outcome == 'success'
271274 name : generate coverage report
272275 run : |
273- python -Im pip install --upgrade coverage[toml]
276+ python -Im pip install 'pip>=25.1'
277+ python -Im pip install --group covcheck
274278 python -Im coverage combine
275279 python -Im coverage report -i -m --format=markdown >> $GITHUB_STEP_SUMMARY
276280 - if : steps.check_downloaded_files.outcome == 'success'
277- uses : actions/upload-artifact@v4
281+ uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
278282 with :
279283 name : .coverage
280284 path : .coverage
285+ if-no-files-found : error
286+ include-hidden-files : true
0 commit comments