Change-Id: I920dc4922056a807b4d25728560fb4f58cbf14c2 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
106 lines
2.7 KiB
INI
106 lines
2.7 KiB
INI
[tox]
|
|
envlist = py3,pep8
|
|
minversion = 4.11.0
|
|
|
|
[testenv]
|
|
usedevelop = true
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper -t manilaclient/tests {posargs}
|
|
|
|
[testenv:newnote]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands = reno new {posargs}
|
|
|
|
[testenv:pep8]
|
|
skip_install = true
|
|
deps =
|
|
pre-commit
|
|
commands =
|
|
pre-commit run --all-files --show-diff-on-failure
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
allowlist_externals = rm
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -b html doc/source doc/build/html
|
|
|
|
[testenv:pdf-docs]
|
|
deps = {[testenv:docs]deps}
|
|
allowlist_externals =
|
|
make
|
|
commands =
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
|
|
[testenv:releasenotes]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
allowlist_externals = rm
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees \
|
|
-b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:functional]
|
|
setenv =
|
|
OS_TEST_PATH = ./manilaclient/tests/functional
|
|
OS_SHARE_API_VERSION = 2
|
|
passenv = OS_*
|
|
commands =
|
|
{envdir}/bin/python setup.py install
|
|
stestr run {posargs}
|
|
|
|
[testenv:genconfig]
|
|
allowlist_externals = bash
|
|
commands =
|
|
{envdir}/bin/python setup.py install
|
|
{envdir}/bin/oslo-config-generator --config-file etc/oslo-config-generator/manilaclient.conf
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source manilaclient --parallel-mode
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:bandit]
|
|
deps = bandit
|
|
commands = bandit -r manilaclient -x manilaclient/tests/* -n5 -ll
|
|
|
|
[flake8]
|
|
show-source = true
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,releasenotes
|
|
# We only enable the hacking (H) checks
|
|
select = H
|
|
# H301 Black will put commas after imports that can't fit on one line
|
|
ignore = H301
|
|
# H106 Don't put vim configuration in source files.
|
|
# H203 Use assertIs(Not)None to check for None.
|
|
# H904 Delay string interpolations at logging calls.
|
|
enable-extensions = H106,H203,H904
|
|
application_import_names = manilaclient
|