Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload json-formatted coverage reports #518

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ jobs:
if: "contains(matrix.name, 'pypy3')"
run: python -m tox -e ${{ steps.split-matrix-name.outputs._0}}

- uses: actions/upload-artifact@v3
with:
name: upload pytest timing reports as json
path: |
./report-*.json

# TODO: https://github.com/pytest-dev/pytest-html/issues/481
# - name: Upload coverage to codecov
# if: github.event.schedule == ''
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ deps =
pytest-rerunfailures
pytest-mock
ansi2html # soft-dependency
pytest-json-report
cov: pytest-cov
commands =
!cov: python -X utf8 -m pytest -v -r a --color=yes --html={envlogdir}/report.html --self-contained-html {posargs}
cov: python -X utf8 -m pytest -v -r a --color=yes --html={envlogdir}/report.html --self-contained-html --cov={envsitepackagesdir}/pytest_html --cov-report=term --cov-report=xml {posargs}
!cov: python -X utf8 -m pytest -v -r a --durations=0 --color=yes --html={envlogdir}/report.html --self-contained-html --json-report --json-report-file={toxinidir}/report-{envname}.json {posargs}
cov: python -X utf8 -m pytest -v -r a --durations=0 --color=yes --html={envlogdir}/report.html --self-contained-html --cov={envsitepackagesdir}/pytest_html --cov-report=term --cov-report=xml --json-report --json-report-file={toxinidir}/report-{envname}.json {posargs}

[testenv:linting]
skip_install = True
Expand Down