ironic-inspector/tox.ini

78 lines
2.7 KiB
INI

[tox]
envlist = py34,py27,pep8,func
[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
-r{toxinidir}/plugin-requirements.txt
commands =
coverage run --branch --include "ironic_inspector*" -m unittest discover ironic_inspector.test.unit
coverage report -m --fail-under 90
setenv = PYTHONDONTWRITEBYTECODE=1
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:venv]
# NOTE(amrith) The setting of the install_command in this location
# is only required because currently infra does not actually
# support constraints files for the environment job, and while
# the environment variable UPPER_CONSTRAINTS_FILE is set, there's
# no file there. It can be removed when infra changes this.
install_command = pip install -U {opts} {packages}
commands = {posargs}
[testenv:releasenotes]
# NOTE(amrith) The setting of the install_command in this location
# is only required because currently infra does not actually
# support constraints files for the release notes job, and while
# the environment variable UPPER_CONSTRAINTS_FILE is set, there's
# no file there. It can be removed when infra changes this.
install_command = pip install -U {opts} {packages}
envdir = {toxworkdir}/venv
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:cover]
# NOTE(amrith) The setting of the install_command in this location
# is only required because currently infra does not actually
# support constraints files for the cover job, and while
# the environment variable UPPER_CONSTRAINTS_FILE is set, there's
# no file there. It can be removed when infra changes this.
install_command = pip install -U {opts} {packages}
commands =
coverage run --branch --include "ironic_inspector*" -m unittest discover ironic_inspector.test.unit
coverage report -m
[testenv:pep8]
basepython = python2.7
commands =
flake8 ironic_inspector
doc8 README.rst CONTRIBUTING.rst doc/source
[testenv:func]
basepython = python2.7
commands =
python -m ironic_inspector.test.functional
[testenv:func3]
basepython = python3.4
commands =
python3 -m ironic_inspector.test.functional
[testenv:genconfig]
envdir = {toxworkdir}/venv
commands = oslo-config-generator --config-file config-generator.conf
[flake8]
max-complexity=15
[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