27474b10c5
Updates: - added functional py312 testenv to tox.ini (not needed for unit tests) - removed py38 classifier from setup.cfg, but did not change python_requires (currently it's >=3.8) - run py311 func job in gate (was py310) Change-Id: I257aa78d8f903f4c009d12a072c53b73e05a18d7
96 lines
2.7 KiB
INI
96 lines
2.7 KiB
INI
[tox]
|
|
minversion = 3.18.0
|
|
skipsdist = True
|
|
# python runtimes: https://governance.openstack.org/tc/reference/project-testing-interface.html#tested-runtimes
|
|
envlist = py3,pep8
|
|
# this allows tox to infer the base python from the environment name
|
|
# and override any basepython configured in this file
|
|
ignore_basepython_conflict=true
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_TEST_TIMEOUT=60
|
|
OS_TEST_PATH=./brick_cinderclient_ext/tests/unit
|
|
passenv =
|
|
*_proxy
|
|
*_PROXY
|
|
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
stestr run {posargs}
|
|
allowlist_externals = find
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs}
|
|
doc8
|
|
|
|
[testenv:fast8]
|
|
envdir = {toxworkdir}/pep8
|
|
commands = {toxinidir}/tools/fast8.sh
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:functional]
|
|
setenv =
|
|
OS_TEST_PATH=./brick_cinderclient_ext/tests/functional
|
|
passenv = OS_*
|
|
|
|
[testenv:functional-py{3,38,39,310,311,312}]
|
|
setenv =
|
|
{[testenv:functional]setenv}
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source brick_cinderclient_ext --parallel-mode
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -b html doc/source doc/build/html
|
|
|
|
[testenv:releasenotes]
|
|
deps = {[testenv:docs]deps}
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper -t brick_cinderclient_ext/tests/unit {posargs}
|
|
|
|
[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, and develop mode disabled
|
|
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
|
# further relies on "tox.skipsdist = True" above).
|
|
deps = bindep
|
|
commands = bindep test
|
|
usedevelop = False
|
|
|
|
[flake8]
|
|
show-source = True
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc/*,*lib/python*,*egg,build
|
|
|
|
[doc8]
|
|
ignore-path=.tox,*.egg-info,doc/src/api,doc/source/drivers.rst,doc/build,.eggs/*/EGG-INFO/*.txt,doc/source/configuration/tables,./*.txt,releasenotes/build
|
|
extension=.txt,.rst,.inc
|
|
|