openstack-health/tox.ini

63 lines
1.6 KiB
INI

[tox]
envlist = py27,py36,py37,pep8,npm-test,npm-lint
minversion = 2.0
skipsdist = True
[testenv]
setenv = VIRTUAL_ENV={envdir}
usedevelop = True
install_command = pip install -U {opts} {packages}
whitelist_externals = *
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
stestr run {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -W -b html doc/source doc/build/html
whitelist_externals = rm
[testenv:pep8]
basepython = python3
commands =
flake8 {toxinidir}/openstack_health {posargs}
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON = coverage run --source openstack_health --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[flake8]
# E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.opendev.org/#/c/36788/
# E123 skipped because it is ignored by default in the default pep8
# E129 skipped because it is too limiting when combined with other rules
# Skipped because of new hacking 0.9: H405
ignore = E125,E123,E129,H404,H405
show-source = True
exclude = .git,.venv,.tox,dist,doc,openstack,*egg
[testenv:npm-test]
basepython = python3
commands = npm test
[testenv:npm-lint]
basepython = python3
commands = npm run lint --silent