Skip to content

Commit

Permalink
ci: combine coverage from the run
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Oct 18, 2022
1 parent 4fa3086 commit 95056ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Expand Up @@ -51,6 +51,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v4
Expand Down Expand Up @@ -95,10 +97,9 @@ jobs:
if: matrix.tox-target == 'tox' && matrix.py == '3.10'
run: tox -e path

- name: Rename coverage report file
if: matrix.tox-target == 'tox'
run: mv ".tox/coverage.${BASE}.xml" .tox/coverage.xml
shell: bash
- name: Combine coverage files
if: always()
run: tox -e coverage

- uses: codecov/codecov-action@v3
if: always()
Expand Down
8 changes: 3 additions & 5 deletions tox.ini
Expand Up @@ -47,6 +47,7 @@ commands =
description = verify build can run from source (bootstrap)
setenv =
PYTHONPATH = {toxinidir}/src
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
commands_pre =
python -E -m pip uninstall -y build colorama

Expand All @@ -59,9 +60,8 @@ commands =
[testenv:{py311, py310, py39, py38, py37, py36, pypy37, pypy38, pypy39}-min]
description = check minimum versions required of all dependencies
skip_install = true
commands =
commands_pre =
pip install .[test] -c tests/constraints.txt
pytest -ra {posargs:-n auto}

[testenv:docs]
description = build documentations
Expand All @@ -88,11 +88,9 @@ commands =
description = combine coverage from test environments
passenv =
DIFF_AGAINST
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage
skip_install = true
deps =
coverage>=5.1
coverage[toml]>=5.1
diff_cover>=3
parallel_show_output = true
commands =
Expand Down

0 comments on commit 95056ba

Please sign in to comment.