Skip to content

Commit

Permalink
fix: combined coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
rudaporto committed Oct 15, 2022
1 parent 1d2276d commit 95272c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ jobs:
python -m pip install --upgrade pip
pip install tox
- name: Test
if: matrix.config[1] != 'coverage'
run: tox -e ${{ matrix.config[1] }}
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
tox -e py36,py37,py38,py39,py39-datetime,py310,py311,coverage
pip install coveralls
coveralls --service=github
env:
Expand Down
15 changes: 3 additions & 12 deletions .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,14 @@ testenv-commands = [
"pytest --cov=src --cov=tests --cov-report= {posargs}",
]
coverage-basepython = "python3"
coverage-deps = [
"coverage",
"-cconstraints.txt",
]
coverage-command = [
"mkdir -p {toxinidir}/parts/htmlcov",
"coverage combine",
"coverage html",
"coverage report -m --fail-under=100",
]
"coverage erase",
"coverage combine"
]
coverage-depends = "py36,py37,py38,py39,py39-datetime,py310,py311"
coverage-setenv = [
"COVERAGE_FILE=.coverage",
]
coverage-allowlist_externals = [
"mkdir",
]

[coverage]
fail-under = 100.0
Expand Down
6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ envlist =
py310
py311
docs
coverage
py39-datetime
coverage

[testenv]
usedevelop = true
Expand Down Expand Up @@ -78,10 +78,8 @@ setenv =
COVERAGE_FILE=.coverage
commands =
mkdir -p {toxinidir}/parts/htmlcov
mkdir -p {toxinidir}/parts/htmlcov
coverage erase
coverage combine
coverage html
coverage report -m --fail-under=100
coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest
coverage html
coverage report -m --fail-under=100.0
Expand Down

0 comments on commit 95272c2

Please sign in to comment.