35db4c21e6
virtualenv pinning was added on Yoga final release time because some of the deliverables' packaging didn't work with the new python module discovery (see details: [1]). 1 year passed, hopefully most of the projects have fixed these errors, so let's unpin virtualenv. Since newest virtualenv introduces some errors, those need to be fixed: - skipdist=False needs to be removed otherwise openstack_releases won't be installed - basepython=python3 is not necessary anymore since there is no py2 - allowlist_external is needed for tools/* scripts This patch also adds python3.10 classifier to setup.cfg [1] https://review.opendev.org/835423 Change-Id: Ibc1f538ddd04c0afeb3d5464fe0b1347ee3ea67a
100 lines
2.9 KiB
INI
100 lines
2.9 KiB
INI
[tox]
|
|
minversion = 3.2.0
|
|
envlist = py3,validate,pep8,bashate,docs
|
|
|
|
[testenv]
|
|
usedevelop=True
|
|
passenv=
|
|
ZUUL_CACHE_DIR
|
|
HOME
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
PYTHONUNBUFFERED=1
|
|
LOGDIR={envdir}/log
|
|
TMPDIR={envdir}/tmp
|
|
PYTHON=coverage run --source openstack_releases --parallel-mode
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_DEBUG=1
|
|
OS_LOG_CAPTURE=1
|
|
allowlist_externals =
|
|
{toxinidir}/tools/*
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report --show-missing
|
|
|
|
[testenv:validate]
|
|
deps =
|
|
yamllint==1.4.1
|
|
-r{toxinidir}/requirements.txt
|
|
commands =
|
|
{toxinidir}/tools/tox-log-command.sh {toxinidir}/tools/run_yamllint.sh
|
|
{toxinidir}/tools/tox-log-command.sh check-schema {posargs}
|
|
{toxinidir}/tools/tox-log-command.sh validate-request {posargs}
|
|
|
|
[testenv:list-changes]
|
|
commands =
|
|
{toxinidir}/tools/tox-log-command.sh list-changes {posargs}
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:bashate]
|
|
deps = bashate
|
|
allowlist_externals = bash
|
|
commands = bash -c "find {toxinidir} \
|
|
-not \( -type d -name .?\* -prune \) \
|
|
-type f \
|
|
-not -name \*~ \
|
|
-not -name \*.md \
|
|
-name \*.sh \
|
|
-print0 | xargs -0 bashate -i E006 -v"
|
|
|
|
[testenv:aclmanager]
|
|
commands = python {toxinidir}/tools/aclmanager.py {posargs}
|
|
|
|
[testenv:check_approval]
|
|
commands = python {toxinidir}/tools/check_approval.py {posargs}
|
|
|
|
[testenv:membership_freeze_test]
|
|
commands = python {toxinidir}/tools/membership_freeze_test.py {posargs}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:history]
|
|
commands = {toxinidir}/tools/build_tag_history.sh {toxinidir}
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -v -a -E -W -j auto -d doc/build/doctrees -b html doc/source doc/build/html
|
|
whereto {toxinidir}/doc/build/html/.htaccess {toxinidir}/doc/build/redirect-tests.txt
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
# E501 skipped because some of the code files include templates
|
|
# that end up quite wide
|
|
# W504 line break after binary operator skipped as it's just wrong
|
|
show-source = True
|
|
ignore = E123,E125,E501,W504
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-*
|
|
|
|
[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.
|
|
deps = bindep
|
|
commands = bindep test
|