@@ -10,18 +10,29 @@ skipsdist = True
10
10
11
11
[testenv]
12
12
changedir = {envtmpdir}
13
+ passenv = CODECOV* CI
13
14
setenv =
14
15
JSON_SCHEMA_TEST_SUITE = {toxinidir}/json
16
+
17
+ coverage,codecov: MAYBE_COVERAGE = coverage run -m
18
+ coverage,codecov: COVERAGE_RCFILE ={toxinidir}/.coveragerc
19
+ coverage,codecov: COVERAGE_DEBUG_FILE ={envtmpdir}/coverage-debug
20
+ coverage,codecov: COVERAGE_FILE ={envtmpdir}/coverage-data
15
21
whitelist_externals =
16
22
mkdir
17
23
commands =
18
24
noextra: {envpython} -m pip install {toxinidir}
19
25
format: {envpython} -m pip install ' {toxinidir}[format]'
20
26
format_nongpl: {envpython} -m pip install ' {toxinidir}[format_nongpl]'
21
27
22
- tests: {envpython} -m twisted.trial {posargs:jsonschema}
28
+ tests,coverage : {envpython} -m {env:MAYBE_COVERAGE:} twisted.trial {posargs:jsonschema}
23
29
tests: {envpython} -m doctest {toxinidir}/README.rst
24
30
31
+ coverage: {envpython} -m coverage report --show-missing
32
+ coverage: {envpython} -m coverage html --directory ={envtmpdir}/htmlcov
33
+ codecov: {envpython} -m coverage xml -o {envtmpdir}/coverage.xml
34
+ codecov: codecov --required --disable gcov --file {envtmpdir}/coverage.xml
35
+
25
36
perf: mkdir {envtmpdir}/benchmarks/
26
37
perf: {envpython} {toxinidir}/jsonschema/benchmarks/issue232.py --inherit-environ JSON_SCHEMA_TEST_SUITE --output {envtmpdir}/benchmarks/issue232.json
27
38
perf: {envpython} {toxinidir}/jsonschema/benchmarks/json_schema_test_suite.py --inherit-environ JSON_SCHEMA_TEST_SUITE --output {envtmpdir}/benchmarks/json_schema_test_suite.json
@@ -69,17 +80,6 @@ deps =
69
80
commands =
70
81
{envpython} -m flake8 {posargs} {toxinidir}/jsonschema {toxinidir}/docs
71
82
72
- [testenv:coverage]
73
- setenv =
74
- {[testenv]setenv}
75
- COVERAGE_DEBUG_FILE ={envtmpdir}/coverage-debug
76
- COVERAGE_FILE ={envtmpdir}/coverage-data
77
- commands =
78
- {envpython} -m pip install ' {toxinidir}[format]'
79
- {envpython} -m coverage run --rcfile ={toxinidir}/.coveragerc -m twisted.trial jsonschema
80
- {envpython} -m coverage report --rcfile ={toxinidir}/.coveragerc --show-missing
81
- {envpython} -m coverage html --directory ={envtmpdir}/htmlcov --rcfile ={toxinidir}/.coveragerc {posargs}
82
-
83
83
[testenv:docs-html]
84
84
basepython = pypy3
85
85
commands = {envpython} -m sphinx -b html {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -q -T -W}
@@ -115,12 +115,3 @@ deps =
115
115
doc8
116
116
pygments
117
117
pygments-github-lexers
118
-
119
- [testenv:codecov]
120
- passenv = CODECOV* CI
121
- setenv = {[testenv:coverage]setenv}
122
- commands =
123
- {envpython} -m pip install ' {toxinidir}[format]'
124
- {envpython} -m coverage run --rcfile ={toxinidir}/.coveragerc -m twisted.trial jsonschema
125
- {envpython} -m coverage xml -o {envtmpdir}/coverage.xml
126
- codecov --required --disable gcov --file {envtmpdir}/coverage.xml
0 commit comments