828e285701
We use release-types as a way to verify that versions are compatible and if needed reflected accurately in the code (puppet, xstatic). If one isn't set explicitly then we assume python-service. In certain circumstances (anything other than the first release in a series) we also perform python specific requirements checking on all 'python' types. Add a new 'generic' type that uses the same rules to validate version numbers but wont run any python specific checks. We need this a projects (like monasca-thresh) will fail the requirements check for 2nd or greater releases[1]. An alternate would be to have the requirements code check if setup.py exists before calling it but that seems like the wrong layer to me. [1] http://logs.openstack.org/54/652854/1/check/openstack-tox-validate/80df01c/job-output.txt.gz#_2019-04-16_06_08_00_636538 Change-Id: I3fcde5eb266f954fddb6871ce8690b93b8fd7a8d
96 lines
2.7 KiB
INI
96 lines
2.7 KiB
INI
[tox]
|
|
minversion = 3.1.0
|
|
envlist = py35,validate,pep8,bashate,docs
|
|
skipdist = True
|
|
ignore_basepython_conflict=true
|
|
|
|
[testenv]
|
|
usedevelop=True
|
|
passenv=
|
|
ZUUL_CACHE_DIR
|
|
HOME
|
|
install_command = pip install -U {opts} {packages}
|
|
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
|
|
basepython = python3
|
|
deps = -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
|
|
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
|
|
whitelist_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 -v"
|
|
|
|
[testenv:aclmanager]
|
|
commands = python {toxinidir}/tools/aclmanager.py {posargs}
|
|
|
|
[testenv:membership_freeze_test]
|
|
commands = python {toxinidir}/tools/membership_freeze_test.py {posargs}
|
|
|
|
[testenv:venv]
|
|
deps = .[sphinxext]
|
|
commands = {posargs}
|
|
|
|
[testenv:history]
|
|
commands = {toxinidir}/tools/build_tag_history.sh {toxinidir}
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -v -a -E -W -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
|
|
show-source = True
|
|
ignore = E123,E125,E501,H405
|
|
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
|