OpenStack Release Bot
c7d48bb36c
Update the URL to the upper-constraints file to point to the redirect rule on releases.openstack.org so that anyone working on this branch will switch to the correct upper-constraints list automatically when the requirements repository branches. Until the requirements repository has as stable/stein branch, tests will continue to use the upper-constraints list on master. Change-Id: Ic9824657bafafdabda7fe3a983c5fee37f7981d7
202 lines
5.8 KiB
INI
202 lines
5.8 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py36,py35,py27,pep8,docs
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
setenv =
|
|
PYTHON=coverage run --source barbican --parallel-mode
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/stein} -U {opts} {packages}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
commands =
|
|
oslo-config-generator --config-file etc/oslo-config-generator/barbican.conf --output-file etc/barbican/barbican.conf
|
|
/usr/bin/find . -type f -name "*.py[c|o]" -delete
|
|
rm -f .testrepository/times.dbm
|
|
coverage erase
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report -m
|
|
whitelist_externals = rm
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
deps =
|
|
{[testenv]deps}
|
|
diff_cover
|
|
commands =
|
|
coverage erase
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
diff-cover --fail-under 100 --compare-branch master cover/coverage.xml
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
sitepackages = False
|
|
commands =
|
|
doc8 {posargs}
|
|
flake8 {posargs}
|
|
# Run security linter
|
|
bandit -r barbican -x tests -n5 -s B105
|
|
|
|
[testenv:genconfig]
|
|
basepython = python3
|
|
whitelist_externals = bash
|
|
envdir = {toxworkdir}/pep8
|
|
commands =
|
|
oslo-config-generator --config-file etc/oslo-config-generator/barbican.conf
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
commands = oslo_debug_helper -t barbican/tests {posargs}
|
|
|
|
[testenv:py3pep8]
|
|
# This hack is in place to allow us to run py3 based flake8
|
|
# without installing barbican.
|
|
basepython = python3
|
|
install_command = /bin/echo {packages}
|
|
commands =
|
|
pip install "hacking>=0.10.0,<0.11"
|
|
flake8 barbican setup.py
|
|
|
|
[testenv:docs]
|
|
# This environment is called from CI scripts to test and publish
|
|
# the main docs to https://docs.openstack.org/barbican
|
|
description = Build main documentation
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands=
|
|
rm -rf doc/build
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
whitelist_externals = rm
|
|
|
|
[testenv:api-guide]
|
|
basepython = python3
|
|
# This environment is called from CI scripts to test and publish
|
|
# the API Guide to developer.openstack.org.
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf api-guide/build
|
|
sphinx-build -W -b html -d api-guide/build/doctrees api-guide/source api-guide/build/html
|
|
|
|
[testenv:api-ref]
|
|
basepython = python3
|
|
# This environment is called from CI scripts to test and publish
|
|
# the API Ref to developer.openstack.org.
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
[testenv:all-docs]
|
|
description = Build all documentation
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands=
|
|
{[testenv:docs]commands}
|
|
{[testenv:api-guide]commands}
|
|
{[testenv:api-ref]commands}
|
|
{[testenv:releasenotes]commands}
|
|
whitelist_externals = rm
|
|
|
|
[testenv:functional]
|
|
# This tox env is purely to make local test development easier
|
|
# Note: This requires local running instances of Barbican and Keystone
|
|
# TODO(dmend): remove --serial and uncomment coverage commands
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
setenv =
|
|
OS_TEST_PATH={toxinidir}/functionaltests
|
|
commands =
|
|
/usr/bin/find . -type f -name "*.py[c|o]" -delete
|
|
stestr run --serial --slowest {posargs}
|
|
# coverage combine
|
|
# coverage html -d cover
|
|
# coverage xml -o cover/coverage.xml
|
|
passenv = KMIP_PLUGIN_ENABLED
|
|
VAULT_PLUGIN_ENABLED
|
|
PKCS11_PLUGIN_ENABLED
|
|
|
|
[testenv:py35functional]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
setenv =
|
|
OS_TEST_PATH={toxinidir}/functionaltests
|
|
commands =
|
|
/usr/bin/find . -type f -name "*.py[c|o]" -delete
|
|
stestr run --slowest {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
passenv = KMIP_PLUGIN_ENABLED
|
|
VAULT_PLUGIN_ENABLED
|
|
PKCS11_PLUGIN_ENABLED
|
|
|
|
[testenv:cmd]
|
|
basepython = python3
|
|
# This tox env is purely to make local test development easier
|
|
# Note: This requires local running instances of Barbican and Keystone
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
setenv =
|
|
OS_TEST_PATH={toxinidir}/barbican/cmd/functionaltests
|
|
commands =
|
|
/usr/bin/find . -type f -name "*.py[c|o]" -delete
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[doc8]
|
|
ignore = D001
|
|
ignore-path = .venv,.git,.tox,.tmp,*barbican/locale*,*lib/python*,barbican.egg*,doc/build,releasenotes/*,doc/source/contributor/api
|
|
|
|
[flake8]
|
|
filename = *.py,app.wsgi
|
|
exclude = .git,.idea,.tox,bin,dist,debian,rpmbuild,tools,*.egg-info,*.eggs,contrib,
|
|
*docs/target,*.egg,build
|
|
|
|
[testenv:bandit]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = bandit -r barbican -x tests -n5 -s B105
|
|
|
|
[testenv:bindep]
|
|
basepython = python3
|
|
# 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
|
|
|
|
[testenv:genpolicy]
|
|
basepython = python3
|
|
envdir = {toxworkdir}/pep8
|
|
commands = oslopolicy-sample-generator --config-file=etc/oslo-config-generator/policy.conf
|
|
|
|
[hacking]
|
|
local-check-factory = barbican.hacking.checks.factory
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
|