tox: Add testenv descriptions

Change-Id: I0a7880d72248e94690a973d3a1fd33c176ed658e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane
2024-04-26 13:14:32 +01:00
parent 19c053efb8
commit 887f1e9385

22
tox.ini
View File

@@ -3,6 +3,8 @@ minversion = 4.3.0
envlist = py3,pep8 envlist = py3,pep8
[testenv] [testenv]
description =
Run unit tests.
usedevelop = true usedevelop = true
setenv = setenv =
OS_STDOUT_CAPTURE=1 OS_STDOUT_CAPTURE=1
@@ -16,6 +18,8 @@ commands =
stestr run {posargs} stestr run {posargs}
[testenv:pep8] [testenv:pep8]
description =
Run style checks.
skip_install = true skip_install = true
deps = deps =
pre-commit pre-commit
@@ -23,6 +27,8 @@ commands =
pre-commit run --all-files --show-diff-on-failure pre-commit run --all-files --show-diff-on-failure
[testenv:bandit] [testenv:bandit]
description =
Run bandit security checks.
skip_install = true skip_install = true
deps = deps =
pre-commit pre-commit
@@ -39,6 +45,8 @@ commands =
stestr run {posargs} stestr run {posargs}
[testenv:functional{,-tips,-py38,-py39,-py310,-py311,-py312}] [testenv:functional{,-tips,-py38,-py39,-py310,-py311,-py312}]
description =
Run functional tests.
setenv = setenv =
OS_TEST_PATH=./openstackclient/tests/functional OS_TEST_PATH=./openstackclient/tests/functional
passenv = passenv =
@@ -52,6 +60,8 @@ commands =
{[testenv]commands} {[testenv]commands}
[testenv:venv] [testenv:venv]
description =
Run specified command in a virtual environment with all dependencies installed.
deps = deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
@@ -60,22 +70,28 @@ commands =
{posargs} {posargs}
[testenv:cover] [testenv:cover]
description =
Run unit tests and generate coverage report.
setenv = setenv =
VIRTUAL_ENV={envdir} {[testenv]setenv}
PYTHON=coverage run --source openstackclient --parallel-mode PYTHON=coverage run --source openstackclient --parallel-mode
commands = commands =
stestr -q run {posargs} stestr run {posargs}
coverage combine coverage combine
coverage html -d cover coverage html -d cover
coverage xml -o cover/coverage.xml coverage xml -o cover/coverage.xml
[testenv:debug] [testenv:debug]
description =
Run specified tests through oslo_debug_helper, which allows use of pdb.
passenv = passenv =
OS_* OS_*
commands = commands =
oslo_debug_helper -t openstackclient/tests {posargs} oslo_debug_helper -t openstackclient/tests {posargs}
[testenv:docs] [testenv:docs]
description =
Build documentation in HTML format.
deps = deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt -r{toxinidir}/doc/requirements.txt
@@ -86,6 +102,8 @@ commands =
whereto doc/build/html/.htaccess doc/test/redirect-tests.txt whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
[testenv:releasenotes] [testenv:releasenotes]
description =
Build release note documentation in HTML format.
deps = deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt -r{toxinidir}/doc/requirements.txt