ironic-inspector/tox.ini
Doug Hellmann 5113ef51c5 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: I8a5c47cb8e4d623776cd4335754184f6f7f0d398
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 13:44:49 -04:00

91 lines
2.5 KiB
INI

[tox]
envlist = py3,py27,pep8,functional
[testenv]
usedevelop = True
install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps =
-r{toxinidir}/test-requirements.txt
commands =
ostestr {posargs}
setenv =
VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE=1
TZ=UTC
TESTS_DIR=./ironic_inspector/test/unit/
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:venv]
commands = {posargs}
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --branch --omit='*test*' --source ironic_inspector --parallel-mode
commands =
coverage erase
ostestr {posargs}
coverage combine
coverage report -m --omit='*test*' --fail-under 90
coverage html -d ./cover --omit='*test*'
[testenv:pep8]
basepython = python2.7
commands =
flake8 ironic_inspector
doc8 README.rst CONTRIBUTING.rst doc/source
[testenv:functional]
basepython = python2.7
commands =
python -m ironic_inspector.test.functional
[testenv:functional-py35]
basepython = python3
commands =
python3 -m ironic_inspector.test.functional
[testenv:genconfig]
envdir = {toxworkdir}/venv
commands = oslo-config-generator --config-file config-generator.conf
[testenv:genpolicy]
sitepackages = False
envdir = {toxworkdir}/venv
commands = oslopolicy-sample-generator --config-file {toxinidir}/policy-generator.conf
[testenv:genstates]
deps = {[testenv]deps}
commands = {toxinidir}/tools/states_to_dot.py -f {toxinidir}/doc/source/images/states.svg --format svg
[flake8]
max-complexity=15
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H204] Use assert(Not)Equal to check for equality.
# [H205] Use assert(Greater|Less)(Equal) for comparison.
# [H904] Delay string interpolations at logging calls.
enable-extensions=H106,H203,H204,H205,H904
import-order-style = pep8
application-import-names = ironic_inspector
[hacking]
import_exceptions = ironicclient.exceptions,ironic_inspector.common.i18n
[testenv:docs]
setenv = PYTHONHASHSEED=0
sitepackages = False
deps = -r{toxinidir}/test-requirements.txt
commands =
python setup.py build_sphinx
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt