4af4e0271d
Update the minversion parameter to use the python -m pip to install python packages: https://tox.readthedocs.io/en/latest/changelog.html#id185 Also Inherit the jobs requirements to simplify maintainance. Change-Id: Icb5116908148dcbb58a7531bbed498d29ca1d2ea
64 lines
1.6 KiB
INI
64 lines
1.6 KiB
INI
[tox]
|
|
minversion = 3.2.0
|
|
envlist = py37,pep8
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
deps =
|
|
-c{env:UPPER_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
|
|
whitelist_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 =
|
|
flake8
|
|
# Run security linter
|
|
bandit -r oslo_concurrency -x tests -n5 --skip B311,B404,B603,B606
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
whitelist_externals = rm
|
|
deps =
|
|
-c{env:UPPER_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 =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[flake8]
|
|
show-source = True
|
|
ignore = H405
|
|
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
|
|
|
|
[testenv:lower-constraints]
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|