File tree Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -229,3 +229,31 @@ jobs:
229
229
uses : codecov/codecov-action@v4
230
230
with :
231
231
token : ${{ secrets.CODECOV_TOKEN }}
232
+
233
+ - name : Upload coverage data
234
+ if : ${{ (success() || failure()) && contains(matrix.coverage, 'github') && matrix.pytest == 'true' }}
235
+ uses : actions/upload-artifact@v4
236
+ with :
237
+ name : coverage-data-${{ matrix.os }}-${{ matrix.toxenv }}
238
+ path : coverage.xml
239
+ if-no-files-found : ignore
240
+
241
+ coverage :
242
+ name : test coverage
243
+ needs :
244
+ - tox
245
+ if : inputs.coverage == 'github'
246
+ runs-on : ubuntu-latest
247
+ steps :
248
+ - uses : actions/checkout@v4
249
+ - uses : actions/download-artifact@v4
250
+ with :
251
+ pattern : coverage-data-*
252
+ merge-multiple : true
253
+ - uses : actions/setup-python@v5
254
+ with :
255
+ python-version : " 3.12"
256
+ - run : python -Im pip install --upgrade coverage[toml]
257
+ - run : python -Im coverage combine
258
+ - run : python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
259
+
Original file line number Diff line number Diff line change @@ -159,8 +159,8 @@ This option has no effect if ``pytest`` is ``false``.
159
159
coverage
160
160
^^^^^^^^
161
161
162
- A space separated list of coverage providers to upload to. Currently
163
- only ``codecov `` is supported . Default is to not upload coverage
162
+ A space separated list of coverage providers to upload to, either
163
+ ``codecov `` or `` github `` . Default is to not upload coverage
164
164
reports.
165
165
166
166
See also, ``CODECOV_TOKEN `` secret.
You can’t perform that action at this time.
0 commit comments