forked from python-jsonschema/jsonschema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
128 lines (108 loc) · 3.78 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[tox]
envlist =
py{35,36,37,38,py2,py3}-{build,tests,tests_nongpl},
demo
readme
safety
secrets
style
docs-{html,doctest,linkcheck,spelling,style}
skipsdist = True
[testenv]
changedir =
!build: {envtmpdir}
setenv =
JSON_SCHEMA_TEST_SUITE = {toxinidir}/json
whitelist_externals =
mkdir
commands =
perf,tests: {envpython} -m pip install '{toxinidir}[format]'
tests_nongpl: {envpython} -m pip install '{toxinidir}[format_nongpl]'
tests,tests_nongpl: {envpython} -m twisted.trial {posargs:jsonschema}
tests: {envpython} -m doctest {toxinidir}/README.rst
perf: mkdir {envtmpdir}/benchmarks/
perf: {envpython} {toxinidir}/jsonschema/benchmarks/issue232.py --inherit-environ JSON_SCHEMA_TEST_SUITE --output {envtmpdir}/benchmarks/issue232.json
perf: {envpython} {toxinidir}/jsonschema/benchmarks/json_schema_test_suite.py --inherit-environ JSON_SCHEMA_TEST_SUITE --output {envtmpdir}/benchmarks/json_schema_test_suite.json
# Check to make sure that releases build and install properly
build: {envpython} -m pep517.check {toxinidir}
deps =
build: pep517
perf: pyperf
tests,tests_nongpl,coverage,codecov: -r{toxinidir}/test-requirements.txt
coverage,codecov: coverage
codecov: codecov
[testenv:bandit]
deps = bandit
commands = {envbindir}/bandit --recursive {toxinidir}/jsonschema
[testenv:demo]
deps = jupyter
commands =
{envbindir}/jupyter nbconvert --output-dir {envtmpdir} {toxinidir}/DEMO.ipynb
[testenv:readme]
changedir = {toxinidir}
deps = readme_renderer
commands =
{envpython} setup.py check --restructuredtext --strict
[testenv:safety]
deps = safety
commands =
{envpython} -m pip install '{toxinidir}[format]'
{envpython} -m safety check
[testenv:secrets]
deps = detect-secrets
commands = {envbindir}/detect-secrets scan {toxinidir}
[testenv:style]
basepython = pypy3
deps =
ebb-lint>=0.19.1.0
commands =
{envpython} -m flake8 {posargs} {toxinidir}/jsonschema {toxinidir}/docs {toxinidir}/setup.py
[testenv:coverage]
setenv =
{[testenv]setenv}
COVERAGE_DEBUG_FILE={envtmpdir}/coverage-debug
COVERAGE_FILE={envtmpdir}/coverage-data
commands =
{envpython} -m pip install '{toxinidir}[format]'
{envpython} -m coverage run --rcfile={toxinidir}/.coveragerc -m twisted.trial jsonschema
{envpython} -m coverage report --rcfile={toxinidir}/.coveragerc --show-missing
{envpython} -m coverage html --directory={envtmpdir}/htmlcov --rcfile={toxinidir}/.coveragerc {posargs}
[testenv:docs-html]
basepython = pypy3
commands = {envpython} -m sphinx -b html {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -q -T -W}
deps =
-r{toxinidir}/docs/requirements.txt
{toxinidir}
[testenv:docs-doctest]
basepython = pypy3
commands = {envpython} -m sphinx -b doctest {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -q -T -W}
deps =
-r{toxinidir}/docs/requirements.txt
{toxinidir}
[testenv:docs-linkcheck]
basepython = pypy3
commands = {envpython} -m sphinx -b linkcheck {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -q -T -W}
deps =
-r{toxinidir}/docs/requirements.txt
{toxinidir}
[testenv:docs-spelling]
basepython = pypy3
commands = {envpython} -m sphinx -b spelling {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -q -T -W}
deps =
-r{toxinidir}/docs/requirements.txt
{toxinidir}
[testenv:docs-style]
basepython = pypy3
commands = doc8 {posargs} {toxinidir}/docs
deps =
doc8
pygments
pygments-github-lexers
[testenv:codecov]
passenv = CODECOV* CI
setenv = {[testenv:coverage]setenv}
commands =
{envpython} -m pip install '{toxinidir}[format]'
{envpython} -m coverage run --rcfile={toxinidir}/.coveragerc -m twisted.trial jsonschema
{envpython} -m coverage xml -o {envtmpdir}/coverage.xml
codecov --required --disable gcov --file {envtmpdir}/coverage.xml