6a2374a675
The patch bumps min version of tox to 3.18.0 in order to replace tox's whitelist_externals by allowlist_externals option: https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23 Change-Id: Ieaefe4dcc6e8aade4a0022f4c632c6787fab3f9d
92 lines
2.6 KiB
INI
92 lines
2.6 KiB
INI
[tox]
|
|
minversion = 3.18.0
|
|
envlist = py3,pep8
|
|
skipsdist = True
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
allowlist_externals = find
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
commands =
|
|
stestr run --serial {posargs}
|
|
stestr slowest
|
|
oslo-config-generator --config-file=etc/vitrage/vitrage-config-generator.conf
|
|
find . -type f -name "test-*.db" -delete
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:genconfig]
|
|
commands = oslo-config-generator --config-file=etc/vitrage/vitrage-config-generator.conf
|
|
|
|
[testenv:genpolicy]
|
|
commands = oslopolicy-sample-generator --config-file=etc/vitrage/vitrage-policy-generator.conf
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
PYTHON=coverage run --source $project --parallel-mode
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
# H106: Don't put vim configuration in source files
|
|
# H203: Use assertIs(Not)None to check for None
|
|
|
|
show-source = True
|
|
ignore = E123,E125,E402,W503,W504,E731
|
|
enable-extensions=H104,H106,H203
|
|
builtins = _
|
|
filename = *.py,app.wsgi
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools/datasource-scaffold
|
|
|
|
[hacking]
|
|
import_exceptions = vitrage.i18n
|
|
|
|
[flake8:local-plugins]
|
|
extension =
|
|
V316 = checks:assert_true_instance
|
|
V329 = checks:check_assert_true_false
|
|
V317 = checks:assert_equal_type
|
|
V319 = checks:no_translate_logs
|
|
V327 = checks:no_mutable_default_args
|
|
V321 = checks:check_no_contextlib_nested
|
|
V322 = checks:dict_constructor_with_list_copy
|
|
V323 = checks:check_python3_xrange
|
|
V324 = checks:check_python3_no_iteritems
|
|
V325 = checks:check_python3_no_iterkeys
|
|
V326 = checks:check_python3_no_itervalues
|
|
V328 = checks:no_log_warn
|
|
paths = ./vitrage/hacking
|
|
|
|
[testenv:releasenotes]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|