-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
74 lines (66 loc) · 2.19 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
[tox]
minversion = 2.0
skipdist = True
envlist = pep8,bashate,py36
# Automatic envs (pyXX) will only use the python version appropriate to that
# env and ignore basepython inherited from [testenv] if we set
# ignore_basepython_conflict.
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
deps =
.[test]
commands =
pytest tests {posargs}
[testenv:pep8]
# using black for code style, so ignore pycodestyle violations from flake8
commands =
flake8 openstack_refapp tests
black --check --diff openstack_refapp tests
[testenv:black]
envdir={toxworkdir}/pep8
# actually format code with black
# run flake8 just in case afterwards
commands =
black openstack_refapp tests
flake8 openstack_refapp tests
[testenv:bashate]
envdir={toxworkdir}/pep8
allowlist_externals = bash
commands = bash -c "find {toxinidir} \
-not \( -type d -name .?\* -prune \) \
-not \( -type d -name doc -prune \) \
-not \( -type f -name localrc -prune \) \
-type f \
-not -name \*~ \
-not -name \*.md \
-not -name \*.orig \
-not -name \*.rej \
-not -name \*.yaml \
-not -name \*.lic \
-not -name \*.py \
\( \
-name \*.sh -or \
-wholename \*/de/\* \
\) \
-print0 | xargs -0 bashate -v -iE006 -eE005,E042"
[testenv:dev]
deps =
.[mysql,pgsql]
commands =
os-refapp
#gunicorn -c {toxinidir}/gunicorn.conf.py openstack_refapp.app:create_app()
[flake8]
extend-ignore = E203
#extend-ignore = E203,E501
[image]
source = mirantis.azurecr.io/openstack/openstack-refapp
[testenv:update-image]
skip_install = True
allowlist_externals =
sed
git
commands =
sed -i "s|\({[image]source}:\)[[:alnum:].]*|\1{posargs}|" {toxinidir}/heat-templates/top.yaml {toxinidir}/terraform/001-input.tf
git commit -am "Prepare release {posargs}"