oslo.limit/tox.ini
John Garbutt 027d5d263c Fix up tox -e cover to use coverage
Change-Id: I4516a958efd4b14a6d0f9f8a7763311f134c5215
2023-10-06 16:55:13 +00:00

64 lines
1.4 KiB
INI

[tox]
minversion = 3.18.0
envlist = py3,pep8,docs
ignore_basepython_conflict = true
[testenv]
basepython = python3
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands =
stestr run {posargs}
stestr slowest
[testenv:pep8]
deps =
-r{toxinidir}/test-requirements.txt
commands =
pre-commit run -a
# Run security linter
bandit -r oslo_limit tests -n5
[testenv:venv]
commands = {posargs}
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
allowlist_externals = rm
commands =
rm -fr doc/build
sphinx-build -W --keep-going -b html doc/source doc/build/html
[testenv:cover]
setenv =
PYTHON=coverage run --source oslo_limit --parallel-mode
commands =
stestr run --slowest {posargs}
coverage combine
coverage html -d cover
coverage report
[testenv:releasenotes]
allowlist_externals = rm
deps =
-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
[flake8]
show-source = True
ignore = W504
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[hacking]
import_exceptions = oslo_limit._i18n
[testenv:debug]
commands = oslo_debug_helper -t oslo_limit/tests {posargs}