tox.ini
[tox]
# Django support for different python versions reference
# https://docs.djangoproject.com/en/dev/faq/install/#faq-python-version-support
envlist =
clean,
py27-django-{18,19,110,111},
py33-django-18,
py{34,35}-django-{18,19,110},
py{34,35,36,37}-django-{111,20},
py{35,36,37}-django-{21, 22},
py{36,37}-django-{30, master},
report,
check, docs, spell,
[travis]
python =
3.3: py33
3.4: py34
3.5: py35
3.6: py36
3.7: py37
3.7: py37
2.7: py27
[travis:env]
DJANGO =
1.10 : django-110
1.11 : django-111
2.0 : django-20
2.1: django-21
2.2: django-22
3.0: django-master
master : django-master
[testenv]
depends =
# https://tox.readthedocs.io/en/latest/config.html#conf-depends
py: clean
report: py,
# http : //tox.readthedocs.io/en/latest/example/general.html?highlight=skipsdist#avoiding-expensive-sdist
skipsdist = True
# http://tox.readthedocs.io/en/latest/config.html#confval-usedevelop=BOOL
# Install the current package in development mode with “setup.py develop” instead of installing from the sdist package. (This uses pip’s -e option, so should be avoided if you’ve specified a custom install_command that does not support -e).
# usedevelop = True maybe necessary to make cov find the .coverage file
# see http://blog.ionelmc.ro/2014/05/25/python-packaging/
usedevelop = True
passenv =
DJANGO_SETTINGS_MODULE
DATABASE_URL
DATABASE_TEST_NAME
setenv =
PYTHONPATH = {toxinidir}
COVERAGE_FILE = .tmp/.coverage.{envname}
whitelist_externals =
ls
xargs
which
printenv
commands =
coverage run --source src --parallel-mode setup.py test
# coverage run --source django_model_cleanup runtests.py
; coverage report
; coverage xml
deps =
coverage
django-111: Django>=1.11,<2.0
django-20: Django>=2.0rc1
django-master: -egit+https://github.com/django/django.git#egg=django
-r{toxinidir}/requirements/testing.txt
basepython =
py36-django-{111,20,21,master}: python3.6
py35-django-{18,19,110,111,20,21,master}: python3.5
py34-django-{18,19,110,111}: python3.4
py33-django-{18}: python3.3
py27-django-{18,19,110,111}: python2.7
# https://blog.ionelmc.ro/2014/05/25/python-packaging/#ci-templates-tox-ini
# https://hynek.me/articles/testing-packaging/
{docs,spell}: python3.6
{bootstrap,clean,check,report,extension-coveralls,coveralls,codecov}: python3.6
[testenv:spell]
setenv =
SPELLCHECK = 1
commands =
sphinx-build -b spelling docs dist/docs
extras = factories
deps = -rrequirements/development.txt
[testenv:docs]
extras = factories
deps = -rrequirements/development.txt
commands =
sphinx-build {posargs: -E} -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs
[testenv:check]
deps =
docutils
check-manifest
flake8
readme-renderer
pygments
isort
skip_install = true
usedevelop = false
commands =
python setup.py check --strict --metadata --restructuredtext
check-manifest --ignore .idea,.idea/* {toxinidir}
flake8 src tests example_project setup.py
isort --verbose --check-only --diff --recursive src tests example_project setup.py
[testenv:report]
setenv =
COVERAGE_FILE = .tmp/.coverage
deps =
coverage
pytest
pytest-cov
skip_install = true
usedevelop = false
commands =
coverage combine --append
coverage report
coverage html
[testenv:clean]
commands = coverage erase
skip_install = true
usedevelop = false
deps = coverage