python-brick-cinderclient-ext/tox.ini
Brian Rosmaita c43cadf1ca Remove Python 2.7 support from testing and gates
Makes Python 3 the base python for all tox venvs and removes
py2 jobs from zuul.yaml.  Defines functional-py36 and -py37
tox venvs and configures them to both be run in check and gate.

Change-Id: Idd9c7ad2c7875c10bc20322bd814ff70e832b920
2019-12-04 18:01:42 -05:00

102 lines
2.9 KiB
INI

[tox]
minversion = 3.1.0
skipsdist = True
skip_missing_interpreters = true
# python runtimes: https://governance.openstack.org/tc/reference/runtimes/ussuri.html
envlist = py37,py36,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
install_command = pip install {opts} {packages}
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:UPPER_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}
whitelist_externals = find
[testenv:pep8]
commands = flake8 {posargs}
[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-py36]
setenv =
{[testenv:functional]setenv}
[testenv:functional-py37]
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:UPPER_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 =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
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
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt