tripleo-validations/tox.ini

90 lines
2.6 KiB
INI

[tox]
minversion = 3.2.0
envlist = linters,docs,py
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
passenv = TERM
setenv =
ANSIBLE_CALLBACK_PLUGINS={toxinidir}/callback_plugins
ANSIBLE_LOOKUP_PLUGINS={toxinidir}/lookup_plugins
ANSIBLE_LIBRARY={toxinidir}/library
ANSIBLE_ROLES_PATH={toxinidir}/roles
ANSIBLE_NOCOWS=1
ANSIBLE_RETRY_FILES_ENABLED=0
ANSIBLE_STDOUT_CALLBACK=debug
ANSIBLE_LOG_PATH={envlogdir}/ansible-execution.log
# 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
PIP_+ VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=en_US.UTF-8
HOME={envdir}
commands =
ansible-galaxy install -fr {toxinidir}/ansible-collections-requirements.yml
stestr run --slowest --color {posargs}
deps =
-c {env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r {toxinidir}/requirements.txt
-r {toxinidir}/test-requirements.txt
whitelist_externals =
bash
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:debug]
commands = oslo_debug_helper {posargs}
[testenv:linters]
deps =
-r {toxinidir}/requirements.txt
-r {toxinidir}/test-requirements.txt
-r {toxinidir}/molecule-requirements.txt
commands =
ansible-galaxy install -fr {toxinidir}/ansible-collections-requirements.yml
python '{toxinidir}/tools/validate-files.py' .
python -m pre_commit run -a
[testenv:releasenotes]
deps = -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:cover]
setenv =
PYTHON=coverage run --parallel-mode
HOME={envdir}
commands =
coverage erase
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:docs]
deps =
-r {toxinidir}/doc/requirements.txt
-r {toxinidir}/molecule-requirements.txt
commands=
sphinx-build -a -E -W -d doc/build/doctrees --keep-going -b html doc/source doc/build/html -T
doc8 doc
[doc8]
# Settings for doc8:
extensions = .rst
ignore = D001