forked from pawamoy/django-appsettings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
163 lines (146 loc) · 3.95 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
[tox]
envlist =
check-setup,
check-bandit,
check-isort,
check-black,
check-flake8,
check-mypy,
check-docs-spell,
check-docs-link,
build-docs,
py35-django{111,20,21,22}
py36-django{111,20,21,22,30}
py37-django{111,20,21,22,30}
py38-django{22,30}
pypy3-django{111,20,21,22}
report
skip_missing_interpreters = true
[testenv]
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/src:{toxinidir}/tests
PYTHONUNBUFFERED=yes
commands = {posargs:pytest --cov --cov-append --cov-report=term-missing -vv runtests.py tests}
deps =
django111: Django>=1.11,<1.12
django20: Django>=2.0,<2.0.99
django21: Django>=2.1,<2.1.99
django22: Django>=2.2,<2.2.99
django30: Django==3.0.*
-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 {posargs} -e py35-django{111,20,21,22},py36-django{111,20,21,22,30},py37-django{111,20,21,22,30},py38-django{22,30},pypy3-django{111,20,21,22},report
[testenv:check]
description = Run all the check environments.
skip_install = true
commands = tox {posargs} -e check-setup,check-bandit,check-isort,check-black,check-flake8,check-mypy,check-docs-spell,check-docs-link
[testenv:build-docs]
description = Build the documentation locally.
skip_install = true
deps = -r{toxinidir}/docs/requirements.txt
commands = sphinx-build {posargs:-E} -b html docs build/docs
[testenv:check-setup]
description = Check that the package will be correctly installed and correctly rendered on PyPI.
deps =
twine
commands =
python setup.py clean --all sdist bdist_wheel
twine check dist/*
[testenv:check-bandit]
description = Run bandit tool on the code.
skip_install = true
deps =
bandit
commands =
bandit -r {toxinidir}/src/appsettings
[testenv:check-flake8]
description = Check the code style.
deps =
flake8
django
commands =
flake8 src/appsettings tests setup.py
[testenv:check-mypy]
description = Check type annotations
deps =
mypy
django
commands =
mypy src/appsettings tests
[testenv:check-black]
description = Run black tool on the code.
basepython = python3.6
skip_install = true
deps =
black
commands =
black --check {toxinidir}/src/appsettings {toxinidir}/tests
[testenv:check-isort]
description = Check the imports order.
deps =
isort
commands =
isort --check-only --diff --recursive src/appsettings tests setup.py
[testenv:check-docs-spell]
description = Check the spelling in the documentation.
skip_install = true
setenv = SPELLCHECK=1
deps =
-r{toxinidir}/docs/requirements.txt
sphinxcontrib-spelling
pyenchant
commands =
- sphinx-build {posargs:-E} -Q -b html docs build/docs
sphinx-build -b spelling -w /dev/null docs build/docs
[testenv:check-docs-link]
description = Check that the links written in documentation are valid.
skip_install = true
deps = -r{toxinidir}/docs/requirements.txt
commands =
- sphinx-build {posargs:-E} -Q -b html docs build/docs
sphinx-build -b linkcheck -w /dev/null docs build/docs
[testenv:run-isort]
description = Check the imports order.
deps =
isort
commands =
isort --apply --recursive src/appsettings tests setup.py
[testenv:run-black]
description = Run black tool on the code.
basepython = python3.6
skip_install = true
deps =
black
commands =
black {toxinidir}/src/appsettings {toxinidir}/tests
[testenv:run-bumpversion]
description = Increase the version number. Argument is 'patch', 'minor' or 'major'.
deps =
bumpversion
commands =
bumpversion {posargs}
[testenv:report]
description = Create coverage report.
skip_install = true
deps = coverage
parallel_show_output = true
depends = py35-django{111,20,21,22},py36-django{111,20,21,22,30},py37-django{111,20,21,22,30},py38-django{22,30},pypy3-django{111,20,21,22}
commands =
coverage combine
coverage report
coverage html
[testenv:codacy]
description = Upload coverage report to codacy.
skip_install = true
deps =
codacy-coverage
coverage
commands =
coverage report
coverage xml --ignore-errors
python-codacy-coverage []