forked from ubernostrum/django-contact-form
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
110 lines (99 loc) · 2.51 KB
/
tox.ini
1
2
3
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Tox (https://tox.readthedocs.io/) is a tool for running tests in
# multiple virtualenvs. This configuration file will run the test
# suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist =
{py35}-django{22}
{py36,py37,py38}-django{22,30}
black
docs
flake8
isort
mypy
spelling
[cleanup]
commands =
find {toxinidir}/tests -type f -name "*.pyc" -delete
find {toxinidir}/tests -type d -name "__pycache__" -delete
find {toxinidir}/src -type f -name "*.pyc" -delete
find {toxinidir}/src -type d -name "__pycache__" -delete
find {toxinidir}/src -type f -path "*.egg-info*" -delete
find {toxinidir}/src -type d -path "*.egg-info" -delete
[pipupgrade]
commands =
{envpython} -m pip install --upgrade pip
[testenv:black]
basepython = python3.8
changedir = {toxinidir}
deps = black
commands =
{[pipupgrade]commands}
black --line-length 88 --check --diff {toxinidir}/src/contact_form {toxinidir}/tests {toxinidir}/docs {toxinidir}
{[cleanup]commands}
[testenv:docs]
changedir = {toxinidir}/docs
commands =
{[pipupgrade]commands}
sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
{[cleanup]commands}
deps =
sphinx
sphinx_rtd_theme
[testenv:spelling]
changedir = {toxinidir}/docs
commands =
{[pipupgrade]commands}
sphinx-build -b spelling -d {envtmpdir}/doctrees . {envtmpdir}/html
{[cleanup]commands}
deps =
sphinx
sphinx_rtd_theme
pyenchant
sphinxcontrib-spelling
[testenv:flake8]
changedir = {toxinidir}
deps = flake8
commands =
{[pipupgrade]commands}
flake8 {toxinidir}/src/contact_form {toxinidir}/tests
{[cleanup]commands}
[testenv:isort]
changedir = {toxinidir}
deps = isort
commands =
{[pipupgrade]commands}
isort --recursive --check-only --diff {toxinidir}/src/contact_form {toxinidir}/tests
{[cleanup]commands}
[testenv:mypy]
basepython = python3.8
changedir = {toxinidir}
deps = mypy
commands =
{[pipupgrade]commands}
mypy --ignore-missing-imports {toxinidir}/src/contact_form {toxinidir}/tests
{[cleanup]commands}
[testenv]
whitelist_externals =
find
setenv =
PYTHONWARNINGS=once::DeprecationWarning
commands =
{[pipupgrade]commands}
coverage run --source contact_form runtests.py
coverage report -m
{[cleanup]commands}
passenv =
PYTHON_AKISMET_API_KEY
PYTHON_AKISMET_BLOG_URL
deps =
akismet
coverage
django22: Django>=2.2,<3.0
django30: Django>=3.0,<3.1
[travis]
python =
3.5: py35
3.6: py36
3.7: py37,
3.8: py38, black, docs, flake8, isort, mypy, spelling