This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathtox.ini
133 lines (122 loc) · 5.16 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
133
[tox]
minversion = 3.18.0
envlist = docs,linters
ignore_base_python_conflict = True
[testenv]
basepython = python3
usedevelop = True
passenv = *
setenv =
ANSIBLE_SKIP_CONFLICT_CHECK=1
ANSIBLE_ACTION_PLUGINS={toxinidir}/tripleo_ansible/roles.galaxy/config_template/action:{toxinidir}/tripleo_ansible/ansible_plugins/action
ANSIBLE_CALLBACK_PLUGINS={toxinidir}/tripleo_ansible/ansible_plugins/callback
ANSIBLE_FILTER_PLUGINS={toxinidir}/tripleo_ansible/ansible_plugins/filter
ANSIBLE_LIBRARY={toxinidir}/tripleo_ansible/roles.galaxy/config_template/library:{toxinidir}/tripleo_ansible/ansible_plugins/modules
ANSIBLE_MODULE_UTILS={toxinidir}/tripleo_ansible/ansible_plugins/module_utils
ANSIBLE_ROLES_PATH={toxinidir}/tripleo_ansible/roles.galaxy:{toxinidir}/tripleo_ansible/roles
ANSIBLE_INVENTORY={toxinidir}/tests/hosts.ini
ANSIBLE_NOCOWS=1
ANSIBLE_RETRY_FILES_ENABLED=0
ANSIBLE_STDOUT_CALLBACK=debug
ANSIBLE_LOG_PATH={envlogdir}/ansible-execution.log
VIRTUAL_ENV={envdir}
LC_ALL=en_US.UTF-8
# pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
# paramiko CryptographyDeprecationWarning: https://github.com/ansible/ansible/issues/52598
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command,ignore::UserWarning
PIP_DISABLE_PIP_VERSION_CHECK=1
TRIPLEO_ANSIBLE_COMPUTE_NODE_MOLECULE_CACHE={homedir}/.cache/tripleo-ansible/containers
TRIPLEO_ANSIBLE_COMPUTE_NODE_MOLECULE_VOLUMES=['{homedir}/.cache/tripleo-ansible/containers:/var/lib/containers:rw','/sys/fs/cgroup:/sys/fs/cgroup:rw']
sitepackages = True
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r {toxinidir}/requirements.txt
-r {toxinidir}/test-requirements.txt
-r {toxinidir}/ansible-requirements.txt
commands =
# ansible-core 2.13.6 installed with py38 does not provide a way to set
# timeout with ansible-galaxy command.
ansible-galaxy install -fr {toxinidir}/tripleo_ansible/ansible-collections-requirements.yml
stestr run {posargs}
allowlist_externals =
bash
tox
true
ansible-galaxy
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test
[testenv:linters]
skip_install = True
sitepackages = False
deps =
pre-commit
virtualenv
-r {toxinidir}/ansible-requirements.txt
commands =
bash -c "ANSIBLE_ROLES_PATH='{toxinidir}/tripleo_ansible/roles.galaxy' \
ansible-galaxy install --timeout 300 -fr {toxinidir}/tripleo_ansible/requirements.yml"
ansible-galaxy install --timeout 300 -fr {toxinidir}/tripleo_ansible/ansible-collections-requirements.yml
python -m pre_commit run -a
[testenv:releasenotes]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r {toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r {toxinidir}/doc/requirements.txt
commands=
ansible-galaxy install --timeout 300 -fr {toxinidir}/tripleo_ansible/ansible-collections-requirements.yml
doc8 doc
sphinx-build -a -E -W -d doc/build/doctrees --keep-going -b html doc/source doc/build/html -T
[doc8]
# Settings for doc8:
extensions = .rst
ignore = D001
[testenv:venv]
commands = {posargs}
[testenv:pep8]
description = "[deprecated], use linters instead."
deps =
{[testenv:linters]deps}
commands =
{[testenv:linters]commands}
skip_install = True
sitepackages = False
[testenv:role-addition]
deps =
pre-commit
virtualenv
-r {toxinidir}/molecule-requirements.txt
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
commands =
ansible-galaxy install --timeout 300 -fr {toxinidir}/tripleo_ansible/ansible-collections-requirements.yml
ansible-playbook -i localhost, -c local zuul.d/playbooks/run-role-addition.yml -e tripleo_src={toxinidir}
bash -c "if podman ps 2> /dev/null; then \
cd {toxinidir}/tripleo_ansible/roles/skeleton_test; \
molecule --base-config {toxinidir}/.config/molecule/config_podman.yml test --all; \
else \
echo -e '\n\nNo molecule tests have been executed\nSee https://docs.openstack.org/tripleo-ansible/latest/contributing.html\n\n'; \
fi"
{[testenv:linters]commands}
[testenv:modules]
deps=
{[testenv:linters]deps}
commands =
bash -c "cd {toxinidir}/tripleo_ansible/ansible_plugins/tests; molecule test --all;"
{[testenv:linters]commands}
[testenv:molecule-compute-node]
deps =
{[testenv:linters]deps}
commands =
ansible-galaxy install --timeout 300 -r {toxinidir}/tripleo_ansible/requirements.yml
pip install -r {toxinidir}/molecule-requirements.txt
bash -c 'mkdir -p $TRIPLEO_ANSIBLE_COMPUTE_NODE_MOLECULE_CACHE'
bash -c "cd {toxinidir}/tripleo_ansible/roles/tripleo_compute_node; molecule test --all {posargs};"