tricircle/tox.ini

107 lines
2.8 KiB
INI

[tox]
minversion = 1.6
envlist = py35,py27,pypy,pep8
skipsdist = True
[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
usedevelop = True
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals =
sh
stestr
commands =
stestr run {posargs}
stestr slowest
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:pep8]
basepython = python3
deps =
-r{toxinidir}/test-requirements.txt
commands = flake8
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands =
python setup.py testr --coverage --testr-args='{posargs}'
coverage report --fail-under=71 --skip-covered
[testenv:genconfig]
basepython = python3
deps =
-r{toxinidir}/test-requirements.txt
commands = oslo-config-generator --config-file=etc/api-cfg-gen.conf
oslo-config-generator --config-file=etc/xjob-cfg-gen.conf
[testenv:genpolicy]
basepython = python3
deps =
-r{toxinidir}/test-requirements.txt
commands = oslopolicy-sample-generator --config-file=etc/policy-generator.conf
[testenv:docs]
basepython = python3
deps =
-r{toxinidir}/test-requirements.txt
commands = python setup.py build_sphinx
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
[flake8]
show-source = True
builtins = _
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
enable-extensions=H106,H203
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[hacking]
import_exceptions = tricircle.common.i18n
[testenv:dev]
# run locally (not in the gate) using editable mode
# https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs
# note that order is important to ensure dependencies don't override
commands =
pip install -q -e "git+https://git.openstack.org/openstack/networking-sfc#egg=networking_sfc"
pip install -q -e "git+https://git.openstack.org/openstack/neutron#egg=neutron"
[testenv:py27-dev]
basepython = python2.7
commands =
{[testenv:dev]commands}
{[testenv]commands}
[testenv:py3-dev]
basepython = python3
commands =
{[testenv:dev]commands}
{[testenv]commands}
[testenv:pep8-dev]
basepython = python3
deps = {[testenv]deps}
-r{toxinidir}/test-requirements.txt
commands = flake8