armada/tox.ini
Tin Lam c39d21eec8 fix(coverage): add coverage rc file
The tox coverage refers to a non-existing rc file. This patch set
redresses this by putting in a proper .coveragerc file similar to
all the other projects.

This patchset also makes the tox coverage job compatible w/ Zuul.

Change-Id: I96a3d13482053b591f7d01e1c5c1e906d84f8fb7
Depends-On: If3cba68492ba9c7a0e78258c7b669d1b39fcdeba
Signed-off-by: Tin Lam <tin@irrational.io>
2018-06-08 06:42:57 +00:00

71 lines
1.7 KiB
INI

[tox]
skipsdist = True
envlist = py35, pep8, cover, bandit
[testenv]
deps=
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
passenv=HTTP_PROXY HTTPS_PROXY http_proxy https_proxy NO_PROXY no_proxy
setenv=
VIRTUAL_ENV={envdir}
basepython = python3.5
usedevelop = True
install_command = pip install {opts} {packages}
whitelist_externals =
find
flake8
rm
commands =
find . -type f -name "*.pyc" -delete
python -V
{toxinidir}/tools/run-unit-tests.sh {posargs}
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -W -b html doc/source doc/build/html
[testenv:genconfig]
commands =
oslo-config-generator --config-file=etc/armada/config-generator.conf
[testenv:genpolicy]
commands =
oslopolicy-sample-generator --config-file=etc/armada/policy-generator.conf
[testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:pep8]
deps =
.[bandit]
{[testenv]deps}
commands =
flake8 {posargs}
# Run security linter as part of the pep8 gate instead of a separate zuul job.
bandit -r armada -x armada/tests -n 5
[testenv:bandit]
commands =
bandit -r armada -x armada/tests -n 5
[testenv:cover]
setenv = {[testenv]setenv}
PYTHON=coverage run --source armada --parallel-mode
commands =
coverage erase
find . -type f -name "*.pyc" -delete
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[flake8]
filename = *.py
ignore =
exclude = .git,.tox,dist,*lib/python*,*egg,build,releasenotes,doc/*,hapi,venv