This repository has been archived by the owner on May 22, 2024. It is now read-only.
forked from eregs/regulations-core
-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
76 lines (64 loc) · 1.9 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
[tox]
envlist = clean,py{27,34,35,36}-django{18,19,110,111}-{elastic,haystack},py{27,34,35,36}-django{110,111}-pgsql,lint,docs
[testenv]
deps =
django18: django~=1.8.0
django19: django~=1.9.0
django110: django~=1.10.0
django111: django~=1.11.0
# Test requirements
coverage~=4.0
mock~=1.3
model_mommy~=1.3
pytest~=3.0
pytest_cov~=2.4
pytest_django~=3.1
extras =
elastic: backend-elastic
haystack: backend-haystack
pgsql: backend-pgsql
commands =
pytest --cov --cov-append regcore regcore_write regcore_read
pgsql: pytest --cov --cov-append regcore regcore_write regcore_read regcore_pgsql
setenv =
elastic: DJANGO_SETTINGS_MODULE = regcore.settings.elastic
pgsql: DJANGO_SETTINGS_MODULE = regcore.settings.pgsql
[testenv:clean]
deps:
coverage~=4.0
commands = coverage erase
skip_install = True
skipsdist = True
[testenv:lint]
deps =
# Dependencies are pinned so that linting is consistent
bandit==1.4.0
flake8==2.5.4
commands =
flake8 regcore regcore_pgsql regcore_read regcore_write manage.py setup.py
bandit -r --ini tox.ini regcore regcore_pgsql regcore_read regcore_write manage.py setup.py
[testenv:docs]
deps = sphinx
commands =
# Tox won't do wildcard expansion, so run in a shell
sh -c "rm docs/regcore*.rst"
sphinx-apidoc -F -o docs regcore
sphinx-apidoc -F -o docs regcore_pgsql
sphinx-apidoc -F -o docs regcore_read
sphinx-apidoc -F -o docs regcore_write
sphinx-build -b dirhtml -d docs/_build/doctrees/ docs/ docs/_build/dirhtml/
whitelist_externals = sh
[bandit]
exclude = regcore/tests,regcore_pgsql/tests,regcore_read/tests,regcore_write/tests
[coverage]
source = regcore,regcore_pgsql,regcore_read,regcore_write
[flake8]
exclude = regcore/migrations/*.py,regcore/settings/*.py
[isort]
known_third_party=six
[pytest]
python_files = tests_*.py *_test.py *_tests.py
DJANGO_SETTINGS_MODULE = regcore.settings.base
[travis]
python =
3.6: py36, lint, docs