blob: 7bf9cf3b83c6393c45b66c2303a0c9ad5303b8cc [file] [log] [blame]
[tox]
envlist = py3,linters
skipsdist = True
sitepackages = False
skip_missing_interpreters = True
[testenv]
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
PYTHONHASHSEED=0
TERM=linux
deps =
flake8
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
install_commands =
pip install {opts} {packages}
[testenv:{py3,py38,py39,py310}]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
commands = stestr run --slowest {posargs}
[testenv:cover]
basepython = python3
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
setenv =
{[testenv]setenv}
PYTHON=coverage run
commands =
coverage erase
stestr run --slowest {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:linters]
skipsdist = True
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:venv]
commands = {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build