78 lines
2.1 KiB
INI
78 lines
2.1 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
envlist = py{37,35,27}{,-mongodb,-mysql,-postgresql,-elasticsearch},pep8
|
|
|
|
[testenv]
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
install_command = pip install -U {opts} {packages}
|
|
usedevelop = True
|
|
setenv =
|
|
PANKO_BACKENDS=mongodb mysql postgresql
|
|
mongodb: PANKO_BACKENDS=mongodb
|
|
mysql: PANKO_BACKENDS=mysql
|
|
postgresql: PANKO_BACKENDS=postgresql
|
|
elasticsearch: PANKO_BACKENDS=elasticsearch
|
|
# NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt
|
|
passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE
|
|
whitelist_externals = bash
|
|
commands =
|
|
oslo-config-generator --config-file=etc/panko/panko-config-generator.conf
|
|
bash run-tests.sh {posargs}
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source panko --parallel-mode
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
deps = hacking<0.13,>=0.12.0
|
|
doc8
|
|
commands = flake8
|
|
doc8 {posargs}
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:genconfig]
|
|
basepython = python3
|
|
commands = oslo-config-generator --config-file=etc/panko/panko-config-generator.conf
|
|
|
|
[testenv:genpolicy]
|
|
basepython = python3
|
|
commands = oslopolicy-sample-generator --config-file=etc/panko/panko-policy-generator.conf
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
commands = python setup.py build_sphinx
|
|
setenv = PYTHONHASHSEED=0
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
setenv = PYTHONHASHSEED=0
|
|
|
|
[doc8]
|
|
ignore = D000
|
|
ignore-path = .venv,.git,.tox,*panko/locale*,*lib/python*,panko.egg*,doc/build,doc/source/api,releasenotes/*
|
|
|
|
[flake8]
|
|
ignore =
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
|
show-source = True
|
|
|
|
[hacking]
|
|
import_exceptions =
|
|
panko.i18n
|
|
local-check-factory = panko.hacking.checks.factory
|