-
Notifications
You must be signed in to change notification settings - Fork 16
/
tox.ini
72 lines (64 loc) · 1.45 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
[tox]
envlist = py{38, 311, 312}-django{42}-drf{latest},quality,docs
[pycodestyle]
exclude = .git,.tox,migrations
max-line-length = 120
[pydocstyle]
ignore = D200,D203
match-dir = (?!migrations)
[pytest]
addopts = --cov config_models --cov-report term-missing
norecursedirs = .* docs requirements
[testenv]
setenv =
PYTHONPATH = {toxinidir}/mock_apps
DJANGO_SETTINGS_MODULE = test_settings
deps =
setuptools
wheel
django42: Django>=4.2,<4.3
drflatest: djangorestframework
-r{toxinidir}/requirements/test.txt
commands =
python -Wd -m pytest --cov {posargs}
python -m coverage html
[testenv:docs]
setenv =
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}/:{toxinidir}/mock_apps
allowlist_externals =
make
rm
deps =
setuptools
wheel
-r{toxinidir}/requirements/doc.txt
commands =
rm -f docs/config_models.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ config_models
make -C docs clean
make -C docs html
python setup.py bdist_wheel
twine check dist/*
[testenv:quality]
setenv =
PYTHONPATH = {toxinidir}/:{toxinidir}/mock_apps
allowlist_externals =
make
rm
touch
deps =
-r{toxinidir}/requirements/quality.txt
commands =
pylint config_models
pylint tests
pycodestyle config_models tests
make help
[testenv:check_keywords]
whitelist_externals =
make
deps =
-r{toxinidir}/requirements/test.txt
commands =
make check_keywords