python-tricircleclient/tox.ini

76 lines
2.0 KiB
INI

[tox]
minversion = 2.0
envlist = py36,py35,py27,pep8
skipsdist = True
[testenv]
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
BRANCH_NAME=master
CLIENT_NAME=python-tricircleclient
DISCOVER_DIRECTORY=tricircleclient/tests/unit
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
# Delete bytecodes from normal directories before running tests.
# Note that bytecodes in dot directories will not be deleted
# to keep bytecodes of python modules installed into virtualenvs.
commands = sh -c "find . -type d -name '.?*' -prune -o \
\( -type d -name '__pycache__' -o -type f -name '*.py[co]' \) \
-print0 | xargs -0 rm -rf"
stestr run {posargs}
whitelist_externals = sh
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t tricircleclient/tests/unit {posargs}
[testenv:pep8]
basepython = python3
deps =
hacking<0.13,>=0.12
rstcheck
commands =
flake8
bash -c "find {toxinidir} -not -path {toxinidir}/.tox/\* \
-name \*.rst -type f \
-print0 | xargs -0 rstcheck --ignore-directive automodule,module \
--ignore-roles mod"
whitelist_externals = bash
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
setenv =
PYTHON=coverage run --source tricircleclient --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report --fail-under=83 --skip-covered
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/stein}
-r{toxinidir}/doc/requirements.txt
commands = python setup.py build_sphinx
[flake8]
show-source = True
ignore =
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt