Set bandit to error on risks of any severity
[mudpy.git] / tox.ini
1 # Copyright (c) 2016-2019 mudpy authors. Permission to use, copy,
2 # modify, and distribute this software is granted under terms
3 # provided in the LICENSE file distributed with this software.
4
5 [tox]
6 minversion = 3.1
7 envlist = bandit, dist, docs, flake8, yamllint, selftest_config, py3
8 skipsdist = True
9 ignore_basepython_conflict = True
10
11 [testenv]
12 basepython = python3
13 usedevelop = True
14 install_command = pip install {opts} {packages}
15 setenv =
16     PYTHONWARNINGS=default::DeprecationWarning
17 commands = mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
18
19 [testenv:bandit]
20 deps = bandit
21 commands = bandit -r mudpy -x mudpy/tests {posargs}
22 usedevelop = False
23
24 [testenv:demo]
25 commands = mudpy {posargs}
26
27 [testenv:dist]
28 whitelist_externals = rm
29 deps =
30     pbr
31     twine
32     wheel
33 commands =
34     rm -fr dist
35     python setup.py bdist_wheel sdist
36     twine check dist/*
37 usedevelop = False
38
39 [testenv:docs]
40 whitelist_externals = rm
41 deps =
42     -r{toxinidir}/requirements.txt
43     -r{toxinidir}/doc/requirements.txt
44 commands =
45     rm -fr doc/build
46     python setup.py sdist
47     sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
48 usedevelop = False
49
50 [testenv:flake8]
51 deps =
52     flake8
53     flake8-bugbear
54 commands = flake8 {posargs}
55 usedevelop = False
56
57 [testenv:selftest_config]
58 commands = mudpy_selftest etc/mudpy.yaml
59
60 [testenv:yamllint]
61 deps = yamllint
62 commands = yamllint --strict {posargs} .
63 usedevelop = False
64
65 [flake8]
66 show-source = True
67 exclude=.git,.tox,*lib/python*,*egg,build