readthedocs.org/tox.ini

75 lines
1.9 KiB
INI

[tox]
minversion=2.9.0
envlist = py{27,36},lint,docs
skipsdist = True
[travis]
python =
2.7: py27
3.6: py36, codecov
[testenv]
description = run test suite for the application with {basepython}
setenv =
PYTHONPATH={toxinidir}/readthedocs:{toxinidir}
DJANGO_SETTINGS_MODULE=readthedocs.settings.test
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
DJANGO_SETTINGS_SKIP_LOCAL=True
passenv = CI TRAVIS TRAVIS_*
deps = -r{toxinidir}/requirements/testing.txt
changedir = {toxinidir}/readthedocs
commands =
py.test --cov-report= --cov-config {toxinidir}/.coveragerc --cov=. {posargs}
[testenv:docs]
description = build readthedocs documentation
changedir = {toxinidir}/docs
commands =
sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
[testenv:migrations]
description = check for missing migrations
changedir = {toxinidir}
commands =
./manage.py makemigrations --check --dry-run
[testenv:docs-lint]
description = run linter (rstcheck) to ensure there aren't errors on our docs
deps = -r{toxinidir}/requirements/docs-lint.txt
changedir = {toxinidir}/docs
commands =
rstcheck -r .
[testenv:lint]
description = run linter (prospector) to ensure the source code corresponds to our coding standards
deps = -r{toxinidir}/requirements/lint.txt
commands =
prospector \
--profile-path={toxinidir} \
--profile=prospector-more \
--die-on-tool-error {posargs}
prospector \
--profile-path={toxinidir} \
--profile=prospector \
--die-on-tool-error {posargs}
[testenv:eslint]
description = run the JavaScript linter (requires `npm install`)
commands =
npm run lint
[testenv:coverage]
description = shows the coverage report
deps = coverage
whitelist_externals = echo
commands =
coverage report --show-missing
coverage html
echo Annotated HTML coverage report is in {toxinidir}/readthedocs/htmlcov/index.html
[testenv:codecov]
description = upload coverage report
deps = codecov
commands = codecov