[tox] envlist = py{35,36,37,38,py,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 = python2.7 mkdir rm sh virtualenv commands = perf,tests: {envbindir}/python -m pip install '{toxinidir}[format]' tests_nongpl: {envbindir}/python -m pip install '{toxinidir}[format_nongpl]' tests,tests_nongpl: {envbindir}/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: virtualenv --quiet --python=python2.7 {envtmpdir}/venv build: {envtmpdir}/venv/bin/pip install --quiet wheel build: {envtmpdir}/venv/bin/python {toxinidir}/setup.py --quiet bdist_wheel --dist-dir={envtmpdir}/wheel build: sh -c '{envbindir}/pip install --quiet --upgrade --force-reinstall {envtmpdir}/wheel/jsonschema*.whl' build: python2.7 {toxinidir}/setup.py --quiet sdist --dist-dir={envtmpdir}/sdist --format=gztar,zip build: sh -c '{envbindir}/pip install --quiet --upgrade --force-reinstall {envtmpdir}/sdist/jsonschema*.tar.gz' build: sh -c '{envbindir}/pip install --quiet --upgrade --force-reinstall {envtmpdir}/sdist/jsonschema*.zip' build: {envbindir}/python -m pep517.check {toxinidir} # FIXME: This has side effects! But it's not my fault... I can't # figure out yet how to get setuptools to not create this directory # here yet. But whatever, probably this will change to pep517.build # soon anways. build: rm -rf {toxinidir}/jsonschema.egg-info 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 = {envbindir}/python setup.py check --restructuredtext --strict [testenv:safety] deps = safety commands = {envbindir}/pip install '{toxinidir}[format]' {envbindir}/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 = {envbindir}/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 = {envbindir}/python -m pip install '{toxinidir}[format]' {envbindir}/coverage run --rcfile={toxinidir}/.coveragerc {envbindir}/trial jsonschema {envbindir}/coverage report --rcfile={toxinidir}/.coveragerc --show-missing {envbindir}/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 TRAVIS TRAVIS_* setenv = {[testenv:coverage]setenv} commands = {envbindir}/python -m pip install '{toxinidir}[format]' {envbindir}/coverage run --rcfile={toxinidir}/.coveragerc {envbindir}/trial jsonschema {envbindir}/coverage xml -o {envtmpdir}/coverage.xml codecov --required --disable gcov --file {envtmpdir}/coverage.xml [travis] python = pypy: pypy, readme, safety, secrets pypy3: pypy3, demo, docs, style