11[tox]
2- envlist = py36-test, py37-test, py38-test, py39-test, py310-test ,
2+ envlist = py36-test, py37-test, py38-test, py39-test, py310-cov ,
33 py311-mypy, py311-covcombine
44isolated_build = true
55skip_missing_interpreters = true
@@ -9,16 +9,18 @@ skip_missing_interpreters = true
99tox_pip_extensions_ext_venv_update = true
1010
1111[test]
12- deps = -r requirements-dev.txt
12+ description = Run pytest in this environment with --cov for use in other stages
13+ deps = -r requirements-dev.txt
14+ commands = pytest --cov -v
1315
1416[testenv]
1517description = Run in a {basepython} virtualenv:
16- test: pytest
17- cov: generate coverage html reports
18- covcombine: generate a combined coverage html report with py27-cov merged in
19- fox: generate coverage html reports and open them in firefox
20- mypy: mypy static analyis
21- covcp: copy the generated .converage and coverage.xml to the UPLOAD_DIR dir for upload
18+ cov: {[cov]description}
19+ covcombine: {[covcombine]description}
20+ covcp: Copy the generated .converage and coverage.xml to the UPLOAD_DIR dir
21+ fox: {[fox]description}
22+ mypy: Run mypy for static analyis (in the future, add pyre, pytype, etc)
23+ test: {[test]description}
2224deps =
2325 {cov,covcp,covcombine,mypy,fox,test}: {[test]deps}
2426 {cov,covcp,covcombine,fox}: coverage[toml]
@@ -55,7 +57,7 @@ setenv =
5557 COVERAGE_FILE ={envlogdir}/.coverage
5658 {[cov]setenv}
5759commands =
58- {cov,covcp,covcombine,fox,test}: pytest --cov -v
60+ {cov,covcp,covcombine,fox,test}: {[test]commands}
5961 {cov,covcp,covcombine}: {[cov]commands}
6062 covcp: cp -av {envlogdir}/coverage.xml {env:UPLOAD_DIR:.}
6163 covcombine: {[covcombine]commands}
@@ -67,18 +69,20 @@ commands =
6769 fox: {[fox]commands}
6870
6971[cov]
70- setenv = PY3_DIFFCOVER_OPTIONS =--ignore-whitespace --show-uncovered
71- py27: PY3_DIFFCOVER_OPTIONS =
72- commands =
73- coverage xml -o {envlogdir}/coverage.xml
72+ description = Generate coverage html reports (incl. diff-cover) for this environment
73+ setenv = PY3_DIFFCOVER_OPTIONS =--ignore-whitespace --show-uncovered
74+ py27: PY3_DIFFCOVER_OPTIONS =
75+ commands =
76+ coverage xml -o {envlogdir}/coverage.xml --fail-under 68
7477 coverage html -d {envlogdir}/htmlcov
7578 coverage html -d {envlogdir}/htmlcov-tests --include =" tests/*"
7679 diff-cover --compare-branch =origin/master \
77- {env:PY3_DIFFCOVER_OPTIONS} --fail-under 91 \
80+ {env:PY3_DIFFCOVER_OPTIONS} --fail-under 94 \
7881 --html-report {envlogdir}/coverage-diff.html \
7982 {envlogdir}/coverage.xml
8083
8184[covcombine]
85+ description = Generate combined coverage reports with py27-test coverage merged
8286commands =
8387 tox -e py27-test
8488 sh -c ' export COVERAGE_FILE=$COVERAGE_FILE-combined; \
@@ -111,6 +115,7 @@ commands =
111115 cat {envlogdir}/pylint-warnings-on-changed-lines.txt;exit 5;fi'
112116
113117[fox]
118+ description = Generate combined coverage html reports and open them in firefox
114119commands = firefox {envlogdir}/coverage-diff.html \
115120 {envlogdir}/htmlcov/index.html \
116121 {envlogdir}/htmlcov-tests/index.html \
0 commit comments