oslo.limit/tox.ini

58 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]
commands = python setup.py test --coverage --coverage-package-name=oslo_limit --testr-args='{posargs}'
[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}