8243e18d78
Change-Id: I12e967cd13f063298fa81689646191c81316468a
79 lines
2.0 KiB
INI
79 lines
2.0 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
skipsdist = True
|
|
envlist = py36,py37,py27,pep8
|
|
|
|
[testenv]
|
|
whitelist_externals = rm
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages}
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
/usr/bin/find . -type f -name "*.py[co]" -delete
|
|
rm -f .testrepository/times.dbm
|
|
stestr run {posargs}
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
commands =
|
|
flake8 {posargs} cloudkitty
|
|
doc8 {posargs}
|
|
|
|
[testenv:bandit]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = bandit -r cloudkitty -n5 -x tests -ll
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
PYTHON=coverage run --source cloudkitty --parallel-mode
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:genconfig]
|
|
basepython = python3
|
|
commands =
|
|
oslo-config-generator --config-file etc/oslo-config-generator/cloudkitty.conf
|
|
|
|
[testenv:genpolicy]
|
|
basepython = python3
|
|
commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/cloudkitty.conf
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
filename = *.py,app.wsgi
|
|
exclude = .git,.venv,.tox,dist,doc,*egg,build,.ropeproject,releasenotes
|
|
ignore = H105
|
|
|
|
[doc8]
|
|
ignore-path = .venv,.git,.tox,.tmp,*cloudkitty/locale*,*lib/python*,cloudkitty.egg*,doc/build,releasenotes/*
|
|
|
|
[hacking]
|
|
import_exceptions = cloudkitty.i18n
|
|
local-check-factory = cloudkitty.hacking.checks.factory
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|