b27ad5ae42
Signed-off-by: Jiri Podivin <jpodivin@redhat.com> Change-Id: I335e1660f56fa254ffd3c6728d4fe4bf9563284f
115 lines
3.1 KiB
INI
115 lines
3.1 KiB
INI
[tox]
|
|
minversion = 3.2.0
|
|
envlist = linters,docs,py3
|
|
skipsdist = True
|
|
|
|
# Automatic envs (pyXX) will only use the python version appropriate to that
|
|
# env and ignore basepython inherited from [testenv] if we set
|
|
# ignore_basepython_conflict.
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
passenv =
|
|
TERM
|
|
setenv =
|
|
# 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
|
|
VIRTUAL_ENV={envdir}
|
|
LANG=en_US.UTF-8
|
|
LANGUAGE=en_US:en
|
|
LC_ALL=en_US.UTF-8
|
|
HOME={envdir}
|
|
commands =
|
|
stestr run --slowest --color {posargs}
|
|
deps =
|
|
-c {env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r {toxinidir}/requirements.txt
|
|
-r {toxinidir}/test-requirements.txt
|
|
-r {toxinidir}/doc/requirements.txt
|
|
whitelist_externals = bash
|
|
|
|
[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:pep8]
|
|
envdir = {toxworkdir}/linters
|
|
commands =
|
|
python -m pre_commit run flake8 -a
|
|
|
|
[testenv:whitespace]
|
|
envdir = {toxworkdir}/linters
|
|
deps = {[testenv:linters]deps}
|
|
commands =
|
|
python -m pre_commit run trailing-whitespace -a
|
|
|
|
[testenv:shebangs]
|
|
envdir = {toxworkdir}/linters
|
|
deps = {[testenv:linters]deps}
|
|
commands =
|
|
python -m pre_commit run check-executables-have-shebangs -a
|
|
|
|
[testenv:linters]
|
|
deps =
|
|
-r {toxinidir}/requirements.txt
|
|
-r {toxinidir}/test-requirements.txt
|
|
commands =
|
|
{[testenv:pep8]commands}
|
|
{[testenv:whitespace]commands}
|
|
{[testenv:shebangs]commands}
|
|
|
|
[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:venv]
|
|
commands = {posargs}
|
|
passenv = *
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
PYTHON=coverage run --parallel-mode
|
|
HOME={envdir}
|
|
commands =
|
|
coverage erase
|
|
stestr run --color {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report --show-missing
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-c {env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r {toxinidir}/test-requirements.txt
|
|
-r {toxinidir}/doc/requirements.txt
|
|
commands=
|
|
sphinx-build -a -E -W -d doc/build/doctrees --keep-going -b html doc/source doc/build/html -T
|
|
doc8 doc
|
|
|
|
[testenv:pdf-docs]
|
|
whitelist_externals = make
|
|
description =
|
|
Build PDF documentation.
|
|
envdir = {toxworkdir}/docs
|
|
deps = {[testenv:docs]deps}
|
|
commands =
|
|
sphinx-build -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
|
|
[doc8]
|
|
# Settings for doc8:
|
|
extensions = .rst
|
|
ignore = D001
|