Files
oslo.config/tox.ini
Elod Illes 913613718b Use global upper constraints for docs targets
With the new 3.0.2 release of Sphinx the 'docs' tox target started to
fail. An easy solution for this problem is to use global upper
constraints for doc builds, which pins sphinx to version 2.2.0 in
python 3.

Change-Id: I57bcf49c43de7acf3f1723881e8d1b069e10db23
2020-04-22 19:59:15 +02:00

84 lines
2.0 KiB
INI

[tox]
minversion = 2.0
distribute = False
envlist = py27,py37,pep8
[testenv]
install_command = pip install {opts} {packages}
whitelist_externals =
find
setenv =
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:1}
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:1}
OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:60}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
find . -type f -name "*.pyc" -delete
stestr run --suppress-attachments {posargs}
stestr slowest
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
[testenv:py27]
basepython = python2.7
[testenv:pep8]
basepython = python3
commands =
flake8
# Run security linter
bandit -r oslo_config -x tests -n5
[testenv:cover]
basepython = python3
setenv =
PYTHON=coverage run --source oslo_config --parallel-mode
commands =
coverage erase
{[testenv]commands}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report --show-missing
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
whitelist_externals = rm
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
-r{toxinidir}/doc/requirements.txt
commands =
rm -fr doc/build
sphinx-build -W -b html doc/source doc/build/html {posargs}
[testenv:bandit]
basepython = python3
commands = bandit -r oslo_config -x tests -n5
[flake8]
show-source = True
enable-extensions = H203,H106
exclude = .tox,dist,doc,*.egg,build
[testenv:releasenotes]
basepython = python3
deps = {[testenv:docs]deps}
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[hacking]
import_exceptions = oslo_config._i18n