tox.ini 3.54 KB
Newer Older
1
[tox]
2 3
envlist =
    clean,setup,safety,style,docs,
4
    py34-django111,
5
    py34-django20,
6
    py35-django111,
7
    py35-django20,
8
    py36-django111,
9
    py36-django20,
10
    py37-dev-django111,
11
    py37-dev-django20,
12
    pypy-django111,
13
    pypy-django20,
14 15 16 17
    report
skip_missing_interpreters = true

[testenv]
18
setenv =
19 20 21
    PYTHONPATH = {toxinidir}:{toxinidir}/src:{toxinidir}/tests
    PYTHONUNBUFFERED=yes
commands = {posargs:pytest --cov --cov-report=term-missing -vv runtests.py tests}
22
deps =
23
    django111: Django>=1.11,<1.12
24
    django20: Django>=2.0,<2.1
25 26 27 28 29 30 31 32
    -r{toxinidir}/requirements/test.txt
passenv = *
usedevelop = false
whitelist_externals = tox

[testenv:test]
description = Run all the Python/Django test environments.
skip_install = true
33
commands = tox -e py34-django111,py34-django20,py35-django111,py35-django20,py36-django111,py36-django20,py37-dev-django111,py37-dev-django20,pypy-django18,pypy-django19,pypy-django111,pypy-django20,
34 35 36 37 38 39
    tox -e report

[testenv:dtest]
description = Run all the Python/Django test environments in parallel.
skip_install = true
deps = detox
40
commands =
41
    detox -e py34-django111,py34-django20,py35-django111,py35-django20,py36-django111,py36-django20,py37-dev-django111,py37-dev-django20,pypy-django18,pypy-django19,pypy-django111,pypy-django20,
42 43 44 45 46 47
    tox -e report

[testenv:detox]
description = Run all the environments in parallel.
skip_install = true
deps = detox
48
commands =
49
    detox -e clean,setup,safety,style,docs,py34-django111,py34-django20,py35-django111,py35-django20,py36-django111,py36-django20,py37-dev-django111,py37-dev-django20,pypy-django18,pypy-django19,pypy-django111,pypy-django20,
50 51 52 53 54
    tox -e report

[testenv:check]
description = Run all the check environments.
skip_install = true
55
commands = tox -e setup,safety,style,docs
56 57 58 59 60

[testenv:dcheck]
description = Run all the check environments in parallel.
skip_install = true
deps = detox
61
commands = detox -e setup,safety,style,docs
62 63 64 65

[testenv:setup]
description = Check that the package will be correctly installed and correctly rendered on PyPI.
skip_install = true
66
deps =
67 68 69 70
    docutils
    check-manifest
    readme-renderer
    pygments
71
commands =
72 73 74 75 76 77
    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
78
deps =
79 80
    bandit
    safety
81
commands =
82 83 84 85 86
    safety check -r {toxinidir}/requirements/base.txt
    bandit -r {toxinidir}/src/hope

[testenv:style]
description = Check the code style.
87
deps =
88 89
    isort
    prospector[with_everything]
90
commands =
91 92 93
    isort --diff --recursive src/hope tests setup.py
    prospector {toxinidir}

94 95
[testenv:docs]
description = Build the documentation locally.
96 97
skip_install = true
setenv = SPELLCHECK=1
98
deps =
99 100 101
    -r{toxinidir}/docs/requirements.txt
    sphinxcontrib-spelling
    pyenchant
102 103
commands =
    sphinx-build {posargs:-E} -b html docs dist/docs
104 105 106 107 108 109 110
    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
111
commands =
112 113 114 115 116 117 118 119 120 121 122 123
    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.
124
deps =
125 126 127
    codacy-coverage
    coverage
skip_install = true
128
commands =
129 130 131 132 133
    coverage combine --append
    coverage report
    coverage xml --ignore-errors
    python-codacy-coverage []