d57c0d7e698cdaf4aec5fff4b6585a8f9eadb6e0
[mudpy.git] / tox.ini
1 # Copyright (c) 2016-2020 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 # TODO(fungi) Switch this to "error" and remove env-specific copies once
16 # https://review.opendev.org/735433 and https://review.opendev.org/735443
17 # merge and appear in a new PBR release
18 setenv =
19     PYTHONWARNINGS=default::DeprecationWarning
20 commands = mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
21
22 [testenv:bandit]
23 setenv =
24     PYTHONWARNINGS=error
25 deps = bandit
26 commands = bandit -r mudpy -x mudpy/tests {posargs}
27 usedevelop = False
28
29 [testenv:demo]
30 commands = mudpy {posargs}
31
32 [testenv:dist]
33 whitelist_externals = rm
34 deps =
35     pbr
36     twine
37     wheel
38 commands =
39     rm -fr dist
40     python setup.py bdist_wheel sdist
41     twine check dist/*
42 usedevelop = False
43
44 [testenv:docs]
45 setenv =
46     PYTHONWARNINGS=error
47 whitelist_externals = rm
48 deps =
49     -r{toxinidir}/requirements.txt
50     -r{toxinidir}/doc/requirements.txt
51 commands =
52     rm -fr doc/build
53     python setup.py sdist
54     sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
55 usedevelop = False
56
57 [testenv:flake8]
58 setenv =
59     PYTHONWARNINGS=error
60 deps =
61     flake8
62     flake8-bugbear
63 commands = flake8 {posargs}
64 usedevelop = False
65
66 [testenv:selftest_config]
67 commands = mudpy_selftest etc/mudpy.yaml
68
69 [testenv:yamllint]
70 setenv =
71     PYTHONWARNINGS=error
72 deps = yamllint
73 commands = yamllint --strict {posargs} .
74 usedevelop = False
75
76 [flake8]
77 show-source = True
78 exclude=.git,.tox,*lib/python*,*egg,build