solum/tox.ini

101 lines
2.4 KiB
INI

[tox]
minversion = 2.0
envlist = py38,py36,pep8
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = find
rm
commands =
find . -type f -name "*.pyc" -delete
rm -f .testrepository/times.dbm
stestr run {posargs}
[testenv:pep8]
commands =
flake8
{toxinidir}/tools/check_for_alembic_branches.sh
[testenv:venv]
commands = {posargs}
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source solum --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:debug]
commands = oslo_debug_helper -t solum/tests {posargs}
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
deps = {[testenv:docs]deps}
whitelist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:genconfig]
commands =
oslo-config-generator --config-file=etc/solum/config-generator.conf
[testenv:genpolicy]
commands =
oslopolicy-sample-generator --config-file=etc/solum/policy-generator.conf
[testenv:releasenotes]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
show-source = True
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[hacking]
import_exceptions = solum.i18n
[flake8:local-plugins]
extension =
M322 = checks:no_mutable_default_args
paths = ./solum/hacking
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
[testenv:bandit]
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r solum -n5 -x tests -ll
[testenv:bandit-baseline]
envdir = {toxworkdir}/bandit
commands = bandit-baseline -r solum -n5 -x tests -ii -ll