Match the layout used in other projects. Change-Id: I2d2f368722ba8d2201c2776d10e0e6d3c0ccb85d Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
83 lines
1.8 KiB
INI
83 lines
1.8 KiB
INI
[tox]
|
|
minversion = 3.18.0
|
|
envlist = py3,pypy,pep8
|
|
|
|
[testenv]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = stestr run --slowest {posargs}
|
|
|
|
[testenv:functional]
|
|
setenv =
|
|
OS_TEST_PATH=./oslo_privsep/tests/functional
|
|
OS_LOG_CAPTURE=1
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
deps = {[testenv]deps}
|
|
coverage
|
|
setenv =
|
|
PYTHON=coverage run --source oslo_privsep --parallel-mode
|
|
commands =
|
|
coverage erase
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report --show-missing
|
|
|
|
[testenv:docs]
|
|
allowlist_externals =
|
|
rm
|
|
deps =
|
|
{[testenv]deps}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/build doc/source/reference/api
|
|
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
|
|
|
[testenv:releasenotes]
|
|
allowlist_externals =
|
|
rm
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:pep8]
|
|
description =
|
|
Run style checks.
|
|
deps =
|
|
pre-commit>=2.6.0 # MIT
|
|
{[testenv:mypy]deps}
|
|
commands =
|
|
pre-commit run -a
|
|
{[testenv:mypy]commands}
|
|
|
|
[testenv:mypy]
|
|
description =
|
|
Run type checks.
|
|
deps =
|
|
{[testenv]deps}
|
|
mypy
|
|
commands =
|
|
mypy --cache-dir="{envdir}/mypy_cache" {posargs:oslo_privsep}
|
|
|
|
[flake8]
|
|
# We only enable the hacking (H) checks
|
|
select = H
|
|
show-source = True
|
|
builtins = _
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
|
|
|
[hacking]
|
|
import_exceptions =
|
|
oslo_privsep._i18n
|
|
typing
|