forked from openstack/ansible-collection-kolla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
132 lines (116 loc) · 3.72 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[tox]
minversion = 3.18
envlist = py3,linters
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
allowlist_externals = find
rm
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
passenv = http_proxy,HTTP_PROXY,https_proxy,HTTPS_PROXY,no_proxy,NO_PROXY
OS_STDOUT_CAPTURE,OS_STDERR_CAPTURE,OS_LOG_CAPTURE,OS_TEST_TIMEOUT
PYTHON,OS_TEST_PATH,LISTOPT,IDOPTION
commands =
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
find . -type d -name "__pycache__" -delete
stestr run --slowest {posargs}
[testenv:debug]
commands = oslo_debug_helper -t tests {posargs}
[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_COVERAGE=1
NOSE_COVER_BRANCHES=1
NOSE_COVER_HTML=1
NOSE_COVER_HTML_DIR={toxinidir}/cover
PYTHON=coverage run --source kolla_ansible,ansible/action_plugins,ansible/library,ansible/roles/keystone/files/ --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:venv]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = {posargs}
[testenv:docs]
skip_install = true
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build/html
{[testenv:docs-iterative]commands}
[testenv:docs-iterative]
envdir = {toxworkdir}/docs
skip_install = {[testenv:docs]skip_install}
deps = {[testenv:docs]deps}
commands =
sphinx-build -n -W --keep-going -b html doc/source doc/build/html
[testenv:pdf-docs]
allowlist_externals = make
rm
skip_install = {[testenv:docs]skip_install}
deps = {[testenv:docs]deps}
commands =
rm -rf doc/build/pdf
sphinx-build -n -W --keep-going -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:releasenotes]
skip_install = {[testenv:docs]skip_install}
deps = {[testenv:docs]deps}
commands =
rm -rf releasenotes/build/html
sphinx-build -n -W --keep-going -b html releasenotes/source releasenotes/build/html
[testenv:linters]
passenv = HOME
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt
allowlist_externals = bash
find
commands =
{[testenv:pep8]commands}
{[testenv:doc8]commands}
{[testenv:bandit]commands}
{[testenv:yamllint]commands}
{[testenv:ansible-sanity]commands}
{[testenv:ansible-lint]commands}
[testenv:pep8]
deps = {[testenv:linters]deps}
commands =
flake8 {posargs}
[flake8]
show-source = True
# NOTE: Default ignore list is *not* empty!
# W504 line break after binary operator
# (W503 and W504 are incompatible and we need to choose one of them.
# Existing codes follows W503, so we disable W504.):
ignore = W504
exclude = .eggs,.git,.tox,doc
[testenv:doc8]
deps = {[testenv:linters]deps}
commands =
doc8 doc/source
reno lint
doc8 -e '.yaml' releasenotes/notes/
[testenv:bandit]
# B303: Use of insecure MD2, MD4, MD5, or SHA1 hash function.
deps = {[testenv:linters]deps}
commands = bandit --skip B303 -r plugins tests
[testenv:yamllint]
deps = {[testenv:linters]deps}
commands = yamllint -s .
[testenv:ansible-sanity]
deps = {[testenv:linters]deps}
commands = bash {toxinidir}/tools/run-ansible-sanity.sh {toxinidir}
[testenv:ansible-lint]
deps = {[testenv:linters]deps}
commands =
ansible-galaxy collection install ansible.posix community.general
ansible-lint -p