Skip to content

Commit

Permalink
upload json-formatted coverage reports
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Jun 14, 2022
1 parent e09ebfa commit f70aa6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ jobs:
- name: Test without coverage
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
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ deps =
pytest-mock
ansi2html # soft-dependency
cov: pytest-cov
cov: pytest-json-report
commands =
!cov: pytest -v -r a --color=yes --html={envlogdir}/report.html --self-contained-html {posargs}
cov: 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: pytest -v -r a --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

0 comments on commit f70aa6c

Please sign in to comment.