oslo.limit/tox.ini
caoyuan 91ca7b0e26 tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: Ib1749e690c22663955985f0c3b718ed6223be223
2019-10-24 15:15:43 +08:00

67 lines
1.5 KiB
INI

[tox]
minversion = 2.5.0
envlist = py27,py37,pep8,docs
[testenv]
install_command = pip install {opts} {packages}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands =
stestr run {posargs}
stestr slowest
[testenv:pep8]
basepython = python3
deps =
-r{toxinidir}/test-requirements.txt
commands =
flake8
# Run security linter
bandit -r oslo_limit tests -n5
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
deps =
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
basepython = python3
whitelist_externals = rm
commands =
rm -fr doc/build
sphinx-build -W --keep-going -b html doc/source doc/build/html
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --coverage-package-name=oslo_limit --testr-args='{posargs}'
[testenv:releasenotes]
basepython = python3
whitelist_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 =
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[hacking]
import_exceptions = oslo_limit._i18n
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt