This repository has been archived by the owner on Jul 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtox.ini
80 lines (68 loc) · 2.05 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
[tox]
envlist = pep8,bandit,unit
[testenv]
setenv = YAMLDIR = {toxinidir}/tests/yaml_samples/
basepython=python3.5
deps=
-rrequirements-lock.txt
-rrequirements-test.txt
[testenv:freeze]
whitelist_externals=rm
deps=
-rrequirements-direct.txt
commands=
rm requirements-lock.txt
sh -c "pip freeze --all | grep -v 'drydock-provisioner' > requirements-lock.txt"
[testenv:yapf]
whitelist_externals=find
commands=
yapf -i -r --style=pep8 {toxinidir}/setup.py
yapf -i -r --style=pep8 {toxinidir}/alembic
yapf -i -r --style=pep8 {toxinidir}/drydock_provisioner
yapf -i -r --style=pep8 {toxinidir}/tests
find {toxinidir}/drydock_provisioner -name '__init__.py' -exec yapf -i --style=pep8 \{\} ;
[testenv:unit]
usedevelop=True
setenv=
PYTHONWARNING=all
YAMLDIR={toxinidir}/tests/yaml_samples/
commands=
py.test \
--cov=drydock_provisioner \
{toxinidir}/tests/unit/{posargs}
[testenv:integration]
passenv=DOCKER_REGISTRY IMAGE_NAME IMAGE_PREFIX IMAGE_TAG
setenv=
PYTHONWARNING=all
YAMLDIR={toxinidir}/tests/yaml_samples/
commands=
{toxinidir}/tests/postgres/start_postgres.sh
py.test \
{toxinidir}/tests/integration/postgres/{posargs}
[testenv:coverage]
usedevelop=True
passenv=DOCKER_REGISTRY IMAGE_NAME IMAGE_PREFIX IMAGE_TAG
setenv=
YAMLDIR={toxinidir}/tests/yaml_samples/
commands=
{toxinidir}/tests/postgres/start_postgres.sh
py.test --cov=drydock_provisioner \
{toxinidir}/tests/unit/ {toxinidir}/tests/integration/postgres
[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/drydock/drydock-config-generator.conf
[testenv:genpolicy]
commands = oslopolicy-sample-generator --config-file etc/drydock/drydock-policy-generator.conf
[testenv:pep8]
commands = flake8 \
{posargs}
[testenv:bandit]
commands = bandit -r drydock_provisioner -n 5
[flake8]
ignore=E302,H306,H304,W503,E251,E126
exclude= venv,.venv,.git,.idea,.tox,*.egg-info,*.eggs,bin,dist,./build/,alembic/
max-line-length=119
[testenv:docs]
whitelist_externals=rm
commands =
rm -rf docs/build
sphinx-build -b html docs/source docs/build