tox.ini 4.41 KB
Newer Older
1
[tox]
2 3
envlist =
    clean,setup,safety,style,docs,
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
    py27-django18,
    py27-django19,
    py27-django110,
    py27-django111,
    py34-django18,
    py34-django19,
    py34-django110,
    py34-django111,
    py35-django18,
    py35-django19,
    py35-django110,
    py35-django111,
    py36-django18,
    py36-django19,
    py36-django110,
    py36-django111,
    py37-dev-django18,
    py37-dev-django19,
    py37-dev-django110,
    py37-dev-django111,
    pypy-django18,
    pypy-django19,
    pypy-django110,
    pypy-django111,
    report
skip_missing_interpreters = true

[testenv]
32
setenv =
33 34 35
    PYTHONPATH = {toxinidir}:{toxinidir}/src:{toxinidir}/tests
    PYTHONUNBUFFERED=yes
commands = {posargs:pytest --cov --cov-report=term-missing -vv runtests.py tests}
36
deps =
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
    django18: Django>=1.8,<1.9
    django19: Django>=1.9,<1.10
    django110: Django>=1.10,<1.11
    django111: Django>=1.11,<1.12
    -r{toxinidir}/requirements/test.txt
passenv = *
usedevelop = false
whitelist_externals = tox

[testenv:test]
description = Run all the Python/Django test environments.
skip_install = true
commands = tox -e py27-django18,py27-django19,py27-django110,py27-django111,py34-django18,py34-django19,py34-django110,py34-django111,py35-django18,py35-django19,py35-django110,py35-django111,py36-django18,py36-django19,py36-django110,py36-django111,py37-dev-django18,py37-dev-django19,py37-dev-django110,py37-dev-django111,pypy-django18,pypy-django19,pypy-django110,pypy-django111,
    tox -e report

[testenv:dtest]
description = Run all the Python/Django test environments in parallel.
skip_install = true
deps = detox
56
commands =
57 58 59 60 61 62 63
    detox -e py27-django18,py27-django19,py27-django110,py27-django111,py34-django18,py34-django19,py34-django110,py34-django111,py35-django18,py35-django19,py35-django110,py35-django111,py36-django18,py36-django19,py36-django110,py36-django111,py37-dev-django18,py37-dev-django19,py37-dev-django110,py37-dev-django111,pypy-django18,pypy-django19,pypy-django110,pypy-django111,
    tox -e report

[testenv:detox]
description = Run all the environments in parallel.
skip_install = true
deps = detox
64 65
commands =
    detox -e clean,setup,safety,style,docs,py27-django18,py27-django19,py27-django110,py27-django111,py34-django18,py34-django19,py34-django110,py34-django111,py35-django18,py35-django19,py35-django110,py35-django111,py36-django18,py36-django19,py36-django110,py36-django111,py37-dev-django18,py37-dev-django19,py37-dev-django110,py37-dev-django111,pypy-django18,pypy-django19,pypy-django110,pypy-django111,
66 67 68 69 70
    tox -e report

[testenv:check]
description = Run all the check environments.
skip_install = true
71
commands = tox -e setup,safety,style,docs
72 73 74 75 76

[testenv:dcheck]
description = Run all the check environments in parallel.
skip_install = true
deps = detox
77
commands = detox -e setup,safety,style,docs
78 79 80 81

[testenv:setup]
description = Check that the package will be correctly installed and correctly rendered on PyPI.
skip_install = true
82
deps =
83 84 85 86
    docutils
    check-manifest
    readme-renderer
    pygments
87
commands =
88 89 90 91 92 93
    python setup.py check --strict --metadata --restructuredtext
    check-manifest {toxinidir}

[testenv:safety]
description = Check that the requirements versions do not have security vulnerabilities.
skip_install = true
94
deps =
95 96
    bandit
    safety
97
commands =
98 99 100 101 102
    safety check -r {toxinidir}/requirements/base.txt
    bandit -r {toxinidir}/src/hope

[testenv:style]
description = Check the code style.
103
deps =
104 105
    isort
    prospector[with_everything]
106
commands =
107 108 109
    isort --diff --recursive src/hope tests setup.py
    prospector {toxinidir}

110 111
[testenv:docs]
description = Build the documentation locally.
112 113
skip_install = true
setenv = SPELLCHECK=1
114
deps =
115 116 117
    -r{toxinidir}/docs/requirements.txt
    sphinxcontrib-spelling
    pyenchant
118 119
commands =
    sphinx-build {posargs:-E} -b html docs dist/docs
120 121 122 123 124 125 126
    sphinx-build -b spelling -w /dev/null docs dist/docs
    sphinx-build -b linkcheck -w /dev/null docs dist/docs

[testenv:report]
description = Create coverage report.
deps = coverage
skip_install = true
127
commands =
128 129 130 131 132 133 134 135 136 137 138 139
    coverage combine --append
    coverage report
    coverage html

[testenv:clean]
description = Delete coverage report.
commands = coverage erase
skip_install = true
deps = coverage

[testenv:codacy]
description = Upload coverage report to codacy.
140
deps =
141 142 143
    codacy-coverage
    coverage
skip_install = true
144
commands =
145 146 147 148 149
    coverage combine --append
    coverage report
    coverage xml --ignore-errors
    python-codacy-coverage []