File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,11 +277,15 @@ jobs:
277277 - name : Test without coverage
278278 if : " ! matrix.use_coverage"
279279 shell : bash
280+ env :
281+ _PYTEST_TOX_POSARGS_JUNIT : --junitxml=junit.xml
280282 run : tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz`
281283
282284 - name : Test with coverage
283285 if : " matrix.use_coverage"
284286 shell : bash
287+ env :
288+ _PYTEST_TOX_POSARGS_JUNIT : --junitxml=junit.xml
285289 run : tox run -e ${{ matrix.tox_env }}-coverage --installpkg `find dist/*.tar.gz`
286290
287291 - name : Generate coverage report
@@ -296,6 +300,14 @@ jobs:
296300 files : ./coverage.xml
297301 verbose : true
298302
303+ - name : Upload JUnit report to Codecov
304+ uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7
305+ with :
306+ fail_ci_if_error : false
307+ files : junit.xml
308+ report_type : test_results
309+ verbose : true
310+
299311 check : # This job does nothing and is only used for the branch protection
300312 if : always()
301313
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ Ahn Ki-Wook
1414Akhilesh Ramakrishnan
1515Akiomi Kamakura
1616Alan Velasco
17+ Alejandro Villate
1718Alessio Izzo
1819Alex Jones
1920Alex Lambson
Original file line number Diff line number Diff line change 1+ The test reports are now published to Codecov from GitHub Actions.
2+ The test statistics is visible `on the web interface
3+ <https://app.codecov.io/gh/pytest-dev/pytest/tests> `__.
4+
5+ -- by :user: `aleguy02 `
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ description =
6262 doctesting: including doctests
6363commands =
6464 {env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}}
65- doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest
65+ doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules {env:_PYTEST_TOX_POSARGS_JUNIT:} --pyargs _pytest
6666 coverage: coverage combine
6767 coverage: coverage report -m
6868passenv =
@@ -71,7 +71,7 @@ passenv =
7171 TERM
7272 CI
7373setenv =
74- _PYTEST_TOX_DEFAULT_POSARGS ={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:} {env:_PYTEST_FILES:}
74+ _PYTEST_TOX_DEFAULT_POSARGS ={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_JUNIT:} {env: _PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:} {env:_PYTEST_FILES:}
7575
7676 # See https://docs.python.org/3/library/io.html#io-encoding-warning
7777 # If we don't enable this, neither can any of our downstream users!
You can’t perform that action at this time.
0 commit comments