forked from CMSgov/regulations-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
59 lines (48 loc) · 1.13 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
[tox]
envlist = py{36,38,39}-django{31},lint,docs
[testenv]
deps =
django31: django~=3.1
# Test requirements
coverage~=4.0
httpretty~=0.8.14
mock~=1.3
pytest~=3.0
pytest_cov~=2.4
pytest_django~=3.1
commands = pytest --cov
[testenv:lint]
deps =
# Dependencies are pinned so that linting is consistent
bandit==1.5.0
flake8==3.4.1
commands =
flake8 regulations
bandit -r --ini tox.ini regulations manage.py setup.py
[testenv:docs]
deps = sphinx
commands =
# Tox won't do wildcard expansion, so run in a shell
sh -c "rm -f docs/regulations*.rst"
sphinx-apidoc -F -o docs regulations
sphinx-build -b dirhtml -d docs/_build/doctrees/ docs/ docs/_build/dirhtml/
whitelist_externals = sh
[testenv:jstests]
deps =
commands = grunt test-js
skip_install = True
skipsdist = True
whitelist_externals = grunt
[bandit]
exclude = regulations/tests
[coverage:run]
source = regulations
omit = regulations/tests/*
[flake8]
exclude = regulations/settings/*.py
max-line-length = 130
[isort]
[pytest]
testpaths = regulations/tests
python_files = tests_*.py *_test.py *_tests.py
DJANGO_SETTINGS_MODULE = regulations.settings.dev