[tox] envlist = py{36,37,38,39,py3}-{noextra,format,format_nongpl}-{build,tests}, readme safety secrets style docs-{html,doctest,linkcheck,spelling,style} skipsdist = True [testenv] changedir = {envtmpdir} passenv = CODECOV* CI setenv = JSON_SCHEMA_TEST_SUITE = {toxinidir}/json coverage,codecov: PYTHONWARNINGS = error,ignore:Creating a LegacyVersion:DeprecationWarning, coverage,codecov: MAYBE_COVERAGE = coverage run -m coverage,codecov: COVERAGE_RCFILE={toxinidir}/.coveragerc coverage,codecov: COVERAGE_DEBUG_FILE={envtmpdir}/coverage-debug coverage,codecov: COVERAGE_FILE={envtmpdir}/coverage-data whitelist_externals = mkdir commands = {envpython} -m pip install 'pip>=21.1.1' # Evade CVE-2021-28363 # Remove once pypa/pip#7555 is closed. noextra: {envpython} -m pip install --use-feature=in-tree-build {toxinidir} format,perf: {envpython} -m pip install --use-feature=in-tree-build '{toxinidir}[format]' format_nongpl: {envpython} -m pip install --use-feature=in-tree-build '{toxinidir}[format_nongpl]' tests,coverage,codecov: {envpython} -m {env:MAYBE_COVERAGE:} twisted.trial {posargs:jsonschema} tests: {envpython} -m doctest {toxinidir}/README.rst coverage: {envpython} -m coverage report --show-missing coverage: {envpython} -m coverage html --directory={envtmpdir}/htmlcov codecov: {envpython} -m coverage xml -o {envtmpdir}/coverage.xml codecov: codecov --required --disable gcov --file {envtmpdir}/coverage.xml 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 build: {envpython} -m build {toxinidir} --outdir {envtmpdir}/dist deps = build: build perf: pyperf tests,coverage,codecov: twisted>=21.2.0rc1 coverage,codecov: coverage codecov: codecov [testenv:bandit] deps = bandit commands = {envbindir}/bandit --recursive {toxinidir}/jsonschema [testenv:readme] deps = build docutils twine commands = {envpython} -m build --outdir {envtmpdir}/dist {toxinidir} {envpython} -m twine check {envtmpdir}/dist/* {envbindir}/rst2html5.py --halt=warning {toxinidir}/CHANGELOG.rst /dev/null [testenv:safety] deps = safety commands = {envpython} -m pip install 'pip>=21.1.1' # Evade CVE-2021-28363 # Remove once pypa/pip#7555 is closed. {envpython} -m pip install --use-feature=in-tree-build '{toxinidir}[format]' {envpython} -m safety check [testenv:secrets] deps = detect-secrets commands = {envbindir}/detect-secrets scan {toxinidir} [testenv:style] deps = flake8 commands = {envpython} -m flake8 {posargs} {toxinidir}/jsonschema {toxinidir}/docs [testenv:docs-html] 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] 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] 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] commands = {envpython} -m sphinx -b spelling {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -T -W} deps = -r{toxinidir}/docs/requirements.txt {toxinidir} [testenv:docs-style] commands = doc8 {posargs} {toxinidir}/docs deps = doc8 pygments pygments-github-lexers