sahara-tests/tox.ini

83 lines
2.0 KiB
INI

[tox]
envlist = py37,py36,py35,py27,pep8,releasenotes
minversion = 2.0
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
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
commands = stestr run {posargs}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_*
[testenv:venv]
basepython = python3
commands = {posargs}
passenv = OS_*
[testenv:venv-py2]
basepython = python2
commands = {posargs}
passenv = OS_*
[testenv:cover]
basepython = python3
setenv =
PACKAGE_NAME=sahara_tests
commands = {toxinidir}/tools/cover.sh {posargs}
[testenv:docs]
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
[tox:jenkins]
downloadcache = ~/cache/pip
[testenv:pylint]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
commands = bash tools/lintstack.sh
[testenv:pep8]
basepython = python3
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
flake8 {posargs}
doc8 doc/source
# Run bashate checks
# E011 is intentionally ignored because it does not make sense; it is
# perfectly reasonable to put 'then' on a separate line when natural
# line breaks occur in long conditionals.
bash -c "find tools -iname '*.sh' -print0 | xargs -0 bashate -v --ignore E011"
whitelist_externals = bash
[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
whitelist_externals =
rm
[flake8]
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
select = E