oslo.concurrency/tox.ini
Hervé Beraud 0af59425ad Fix issues related to tox4
Related to https://lists.openstack.org/pipermail/openstack-discuss/2023-February/032247.html

Change-Id: I38b5e7fe25820ffda712bbc983e4ea3d6c3bf17d
2023-02-17 13:16:04 +00:00

56 lines
1.5 KiB
INI

[tox]
minversion = 3.2.0
envlist = py3,pep8
[testenv]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
# We want to support both vanilla stdlib and eventlet monkey patched
allowlist_externals = env
commands =
env TEST_EVENTLET=0 lockutils-wrapper stestr run --slowest {posargs}
env TEST_EVENTLET=1 lockutils-wrapper stestr run --slowest {posargs}
[testenv:pep8]
deps = {[testenv]deps}
commands =
pre-commit run -a
# Run security linter
bandit -r oslo_concurrency -x tests -n5 --skip B311,B404,B603,B606
[testenv:venv]
commands = {posargs}
[testenv:docs]
allowlist_externals = rm
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
commands =
rm -fr doc/build
sphinx-build -W --keep-going -b html doc/source doc/build/html {posargs}
[testenv:cover]
setenv =
PYTHON=coverage run --source oslo_concurrency --parallel-mode
commands =
env TEST_EVENTLET=0 lockutils-wrapper stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[flake8]
show-source = True
ignore = H405,W504
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build
[hacking]
import_exceptions =
oslo_concurrency._i18n
[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html