1ac92cc7f6
This patchset renames the tox.ini coverage job to cover to
comply with OpenStack standards [0]. This is needed so that [1]
works seamlessly (it will enable py35 and cover jobs for Armada).
[0] e.g. 04469a5181/tox.ini (L119)
[1] I174d5df008f6e000da1a3878afe75919312ea7aa
Change-Id: I353a60313bef2f8aa0319a4e89e659cd23c8a4a9
61 lines
1.3 KiB
INI
61 lines
1.3 KiB
INI
[tox]
|
|
skipsdist = True
|
|
envlist = py35, pep8, coverage, 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:pep8]
|
|
commands =
|
|
flake8 {posargs}
|
|
|
|
[testenv:bandit]
|
|
commands =
|
|
bandit -r armada -x armada/tests -n 5
|
|
|
|
[testenv:cover]
|
|
passenv=http_proxy https_proxy no_proxy HTTP_PROXY HTTPS_PROXY NO_PROXY
|
|
setenv=
|
|
VIRTUAL_ENV={envdir}
|
|
commands =
|
|
python -m pytest \
|
|
--cov-branch \
|
|
--cov-report term-missing:skip-covered \
|
|
--cov-config .coveragerc \
|
|
--cov=armada
|
|
|
|
[flake8]
|
|
filename = *.py
|
|
ignore =
|
|
exclude = .git,.tox,dist,*lib/python*,*egg,build,releasenotes,doc/*,hapi,venv
|