oslo.config/tox.ini

74 lines
1.7 KiB
INI

[tox]
minversion = 3.2.0
distribute = False
envlist = py37,pep8
ignore_basepython_conflict = true
[testenv]
basepython = python3
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/master}
-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]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
[testenv:pep8]
commands =
flake8
# Run security linter
bandit -r oslo_config -x tests -n5
[testenv:cover]
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]
commands = {posargs}
[testenv:docs]
whitelist_externals = rm
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -fr doc/build
sphinx-build -W --keep-going -b html doc/source doc/build/html {posargs}
[testenv:bandit]
commands = bandit -r oslo_config -x tests -n5
[flake8]
show-source = True
enable-extensions = H203,H106
exclude = .tox,dist,doc,*.egg,build
[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
[hacking]
import_exceptions = oslo_config._i18n