-
Notifications
You must be signed in to change notification settings - Fork 43
/
tox.ini
94 lines (79 loc) · 2.23 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
88
89
90
91
92
93
94
[tox]
minversion = 3.1.1
envlist = py27,py37,linters,dist,insights,molecule
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
commands = python setup.py test
whitelist_externals =
bash
rm
[testenv:linters]
# py3 linters are able to stop more than py2 ones
basepython = python3
extras = insights
commands =
{[testenv:pep8]commands}
python -m pre_commit run -a
pykwalify -d browbeat-config.yaml -s browbeat/schema/browbeat.yml
pykwalify -d browbeat-complete.yaml -s browbeat/schema/browbeat.yml
bash -c "set -e; for config in $(ls conf/); do \
echo conf/$config; pykwalify -d conf/$config -s browbeat/schema/browbeat.yml; done"
{[testenv:dist]commands}
allowlist_externals =
bash
[testenv:dist]
basepython = python3
# reuse linters environment to lower footprint on dev machines
envdir = {toxworkdir}/linters
# test that we can build a valid package
commands =
python setup.py sdist bdist_wheel
python -m twine check dist/*
[testenv:insights]
commands =
pip check
pip install .[insights]
pip check
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:py27]
basepython = python2.7
commands = pytest {posargs}
[testenv:py37]
basepython = python3.7
commands = pytest {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args={posargs}
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:publish]
envdir = {toxworkdir}/py27
commands =
rm -rf dist/*
rm -rf build/*
python setup.py sdist bdist_wheel
twine upload dist/*
[testenv:molecule]
commands = {toxinidir}/ci-scripts/molecule/test-molecule.sh
allowlist_externals =
{toxinidir}/ci-scripts/molecule/test-molecule.sh
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E117,E123,E125,E226,E302,E41,E231,E203,H233,H306,H238,H236,H404,H405,W504
max-line-length = 100
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible/*,.browbeat-venv,.rally-venv,.shaker-venv,browbeat-containers/*