-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtox.ini
68 lines (62 loc) · 1.89 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
[tox]
minversion = 1.6
envlist = linters
skipsdist = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install {opts} {packages}
[testenv:linters]
deps =
hacking>=6.0.1,<7.0.0 # Apache-2.0
bashate>=0.2 # Apache-2.0
PyYAML>=3.10.0 # MIT
ansible
openstacksdk
testtools
mock
yamllint
allowlist_externals =
bash
{toxinidir}/tools/run-bashate.sh
setenv =
ANSIBLE_LIBRARY= {toxinidir}/tools/fake-ansible/library
commands =
flake8
{toxinidir}/tools/run-bashate.sh
python3 {toxinidir}/tools/check_clouds_yaml.py
# The following command validates that inventory/base/hosts.yaml
# parses, but doesn't do anything.
bash -c "ANSIBLE_INVENTORY_PLUGINS=./playbooks/roles/install-ansible/files/inventory_plugins ansible -i ./inventory/base/hosts.yaml not_a_host -a 'true'"
python3 -m unittest playbooks/roles/install-ansible/files/inventory_plugins/test_yamlgroup.py
# Verify with yamlling kustomize stuff
yamllint kubernetes/
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
allowlist_externals =
cp
commands =
python3 {toxinidir}/tools/generate-diagrams.py --path doc/source/_svg
sphinx-build -W -E -b html doc/source doc/build/html -vv
# this copy is crucially important for svg to work
cp -av doc/source/_images doc/build/html/
[testenv:testinfra]
deps =
ansible-core
pytest-html # MPL-2.0
pytest-testinfra>=6.0.0
python-memcached
selenium
# This environment assumes a gate-hosts.yaml file has been written.
passenv =
TESTINFRA_EXTRA_DATA
commands = py.test \
--junit-xml junit.xml -o junit_family=xunit1 \
--html=test-results.html --self-contained-html \
--connection=ansible \
--ansible-inventory=/home/zuul/src/github.com/opentelekomcloud-infra/system-config/inventory/base/gate-hosts.yaml -v testinfra {posargs}
[flake8]
show-source = True
exclude = .tox,.eggs
ignore = E125,H
select = H231