It is a preferred way to define the constraints file. Change-Id: I876a5d0694ebb36943a3fdaf6713f891e3e875c0 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
63 lines
1.3 KiB
INI
63 lines
1.3 KiB
INI
[tox]
|
|
minversion = 4.28.0
|
|
envlist = py3,pep8
|
|
|
|
[testenv]
|
|
constraints =
|
|
{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
commands = stestr run --slowest {posargs}
|
|
|
|
[testenv:pep8]
|
|
description =
|
|
Run style checks.
|
|
deps =
|
|
pre-commit
|
|
{[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:oslotest}
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
PYTHON=coverage run --source oslotest --parallel-mode
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
|
|
|
|
[testenv:releasenotes]
|
|
deps =
|
|
{[testenv:docs]deps}
|
|
commands =
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[flake8]
|
|
# We only enable the hacking (H) checks
|
|
select = H
|
|
# H301 Black will put commas after imports that can't fit on one line
|
|
ignore = H301
|
|
show-source = true
|
|
exclude = .tox,dist,doc,*.egg,build
|