11[tox]
22envlist = py3,pep8,docs
3- minversion = 3.18.0
4- ignore_basepython_conflict = true
3+ minversion = 4.6.0
54
65[testenv]
7- basepython = python3
6+ description =
7+ Run unit tests.
88usedevelop = true
9- # tox is silly... these need to be separated by a newline....
109allowlist_externals =
1110 find
1211 rm
@@ -23,10 +22,20 @@ commands =
2322 stestr run {posargs}
2423
2524[testenv:pep8]
26- commands = flake8 {posargs}
25+ description =
26+ Run style checks.
27+ deps =
28+ pre-commit
29+ commands =
30+ pre-commit run --all-files --show-diff-on-failure
2731
2832[testenv:bandit]
29- commands = bandit -r novaclient -n5 -x tests
33+ description =
34+ Run security checks.
35+ deps =
36+ pre-commit
37+ commands =
38+ pre-commit run --all-files --show-diff-on-failure bandit
3039
3140[testenv:venv]
3241deps =
3746commands = {posargs}
3847
3948[testenv:docs]
49+ description =
50+ Build documentation in HTML format.
4051deps =
4152 -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
4253 -r{toxinidir}/doc/requirements.txt
@@ -47,26 +58,35 @@ commands =
4758 whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
4859
4960[testenv:pdf-docs]
61+ description =
62+ Build documentation in PDF format.
5063deps = {[testenv:docs]deps}
5164commands =
5265 rm -rf doc/build/pdf
5366 sphinx-build -W -b latex doc/source doc/build/pdf
5467 make -C doc/build/pdf
5568
5669[testenv:releasenotes]
70+ description =
71+ Build release notes.
5772deps =
5873 -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
5974 -r{toxinidir}/doc/requirements.txt
6075commands =
6176 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
6277
6378[testenv:functional{,-py39,-py310,-py311,-py312}]
64- passenv = OS_*
79+ description =
80+ Run functional tests.
81+ passenv =
82+ OS_*
6583commands =
6684 stestr --test-path =./novaclient/tests/functional run --concurrency =1 {posargs}
6785 python novaclient/tests/functional/hooks/check_resources.py
6886
6987[testenv:cover]
88+ description =
89+ Run unit tests and print coverage information.
7090setenv =
7191 PYTHON =coverage run --source novaclient --parallel-mode
7292commands =
@@ -93,11 +113,12 @@ exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,doc/source/conf.py,releasen
93113import_exceptions = novaclient.i18n
94114
95115[testenv:bindep]
116+ description =
117+ Check for installed binary dependencies.
96118# Do not install any requirements. We want this to be fast and work even if
97119# system dependencies are missing, since it's used to tell you what system
98120# dependencies are missing! This also means that bindep must be installed
99121# separately, outside of the requirements files.
100122deps = bindep
101- skipsdist =True
102- usedevelop =False
123+ skip_install = true
103124commands = bindep test
0 commit comments