tripleo-quickstart/tox.ini

94 lines
2.7 KiB
INI

[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}