forked from openstack-archive/tripleo-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
93 lines (83 loc) · 2.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
[tox]
envlist = docs, linters, molecule
minversion = 3.4.0
ignore_basepython_conflict = True
skip_missing_interpreters = True
skipsdist = True
[testenv]
usedevelop = True
install_command = {envpython} -m pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
setenv =
ANSIBLE_FORCE_COLOR={env:ANSIBLE_FORCE_COLOR:1}
ANSIBLE_INVENTORY={toxinidir}/tests/hosts.ini
ANSIBLE_NOCOWS=1
ANSIBLE_RETRY_FILES_ENABLED=0
ANSIBLE_STDOUT_CALLBACK={env:ANSIBLE_STDOUT_CALLBACK:debug}
ANSIBLE_VERBOSITY={env:ANSIBLE_VERBOSITY:1}
PY_COLORS={env:PY_COLORS:1}
VIRTUAL_ENV={envdir}
# 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
passenv =
ANSIBLE_*
CURL_CA_BUNDLE
DOCKER_*
MOLECULE_*
REQUESTS_CA_BUNDLE
SSH_AUTH_SOCK
SSL_CERT_FILE
TERM
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals =
bash
echo
[testenv:bindep]
basepython = python3
# 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:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
bash -c 'python fs-matrix.py > doc/source/feature-configuration-generated.rst'
sphinx-build -W -b html doc/source doc/build/html
[testenv:bashate]
envdir = {toxworkdir}/linters
commands =
python -m pre_commit run bashate -a
[testenv:molecule]
# basepython forces tox to use system python and avoid other python versions like pyenv ones
# because those are unlikely to have the required libselinux library available.
basepython=python3
deps = -r{toxinidir}/molecule-requirements.txt
commands =
python -m pytest --color=yes --html={envlogdir}/reports.html --self-contained-html {tty:-s} {posargs}
[testenv:pep8]
envdir = {toxworkdir}/linters
commands =
python -m pre_commit run flake8 -a
[testenv:ansible-lint]
setenv =
ANSIBLE_LIBRARY=./library
envdir = {toxworkdir}/linters
commands =
python -m pre_commit run ansible-lint -a
[testenv:linters]
basepython = python3
commands =
# check only modified files:
python -m pre_commit run -a
[testenv:releasenotes]
basepython = python3
whitelist_externals = bash
commands = bash -c ci-scripts/releasenotes_tox.sh
[testenv:venv]
changedir = {toxinidir}
commands =
{posargs:echo done}