-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
87 lines (75 loc) · 1.93 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
[tox]
envlist = py27,
py34,
linters,
coverage
[travis]
python =
2.7: py27
3.4: py34, linters
###
# Base - run some tests
###
[testenv]
whitelist_externals = bash
mv
deps = pytest
cov-core
six
# commands = py.test
commands = bash -c "if [ ! -d .coverage_data ]; then mkdir .coverage_data; fi"
coverage run -a --rcfile={toxinidir}/.coveragerc -m pytest -v
mv {toxinidir}/.coverage {toxinidir}/.coverage_data/.coverage.{envname}
###
# Test Coverage
###
[testenv:coverage]
deps = cov-core
skip_install = true
commands = bash -c "if [ -d .coverage_data ]; then coverage combine .coverage_data ; rmdir .coverage_data ; fi"
coverage report --rcfile={toxinidir}/.coveragerc
###
# Code Quality
###
[testenv:linters]
skip_install = true
#deps = {[testenv:pylint]deps}
deps = {[testenv:flake8]deps}
{[testenv:bandit]deps}
#commands = {[testenv:pylint]commands}
commands = {[testenv:flake8]commands}
{[testenv:bandit]commands}
[testenv:pylint]
deps = pyflakes
pylint
commands = pylint --reports=n --rcfile={toxinidir}/pylint.rc pycinga/
[testenv:flake8]
deps = flake8
flake8-quotes
flake8-import-order
skip_install = true
commands = flake8 pycinga/ tests/
[flake8]
# max-complexity = 15
ignore = I202
inline-quotes = "
exclude = .coverage_data,.tox,dist
max-line-length = 99
import-order-style = smarkets
application-import-names = pycinga
[testenv:bandit]
deps = bandit
skip_install = true
commands = bandit -r -c {toxinidir}/.bandit.yml pycinga/
# --------------------------------------------------------------------
# Documentation
# --------------------------------------------------------------------
[testenv:docs]
deps = docutils
jinja2
markupsafe
pygments
sphinx>=1.4.4
sphinx_rtd_theme
whitelist_externals = rm
commands = sphinx-build -E -b html -d docs/_build/doctrees docs docs/_build/html []