| 1 | [tox] |
| 2 | envlist = cov-init, py36, py37, noextras, docs, packaging, cov-report |
| 3 | |
| 4 | [testenv] |
| 5 | passenv = CI TRAVIS TRAVIS_* CODECOV |
| 6 | whitelist_externals = |
| 7 | bash |
| 8 | make |
| 9 | setenv = |
| 10 | PYTHONPATH = {toxinidir}:{toxinidir}/cli_helpers |
| 11 | COVERAGE_FILE = .coverage.{envname} |
| 12 | commands = |
| 13 | pytest --cov-report= --cov=cli_helpers |
| 14 | coverage report |
| 15 | bash -c 'if [ -n "$CODECOV" ]; then {envbindir}/coverage xml && {envbindir}/codecov; fi' |
| 16 | deps = -r{toxinidir}/requirements-dev.txt |
| 17 | usedevelop = True |
| 18 | |
| 19 | [testenv:noextras] |
| 20 | commands = |
| 21 | pip uninstall -y Pygments |
| 22 | {[testenv]commands} |
| 23 | |
| 24 | [testenv:docs] |
| 25 | changedir = docs |
| 26 | deps = sphinx |
| 27 | whitelist_externals = make |
| 28 | commands = |
| 29 | make clean |
| 30 | make html |
| 31 | make linkcheck |
| 32 | |
| 33 | [testenv:packaging] |
| 34 | deps = |
| 35 | check-manifest |
| 36 | readme_renderer[md] |
| 37 | -r{toxinidir}/requirements-dev.txt |
| 38 | commands = |
| 39 | check-manifest --ignore .travis/* |
| 40 | ./setup.py sdist |
| 41 | twine check dist/* |
| 42 | ./setup.py check -m -s |
| 43 | |
| 44 | [testenv:cov-init] |
| 45 | setenv = |
| 46 | COVERAGE_FILE = .coverage |
| 47 | deps = coverage |
| 48 | commands = |
| 49 | coverage erase |
| 50 | |
| 51 | |
| 52 | [testenv:cov-report] |
| 53 | setenv = |
| 54 | COVERAGE_FILE = .coverage |
| 55 | deps = coverage |
| 56 | commands = |
| 57 | coverage combine |
| 58 | coverage report |