diff --git a/tox.ini b/tox.ini index 50a5477c..96ad9556 100644 --- a/tox.ini +++ b/tox.ini @@ -4,13 +4,14 @@ envlist = py3,pep8,releasenotes [testenv] usedevelop = True -setenv = VIRTUAL_ENV={envdir} - OS_STDOUT_NOCAPTURE=False - OS_STDERR_NOCAPTURE=False +setenv = + VIRTUAL_ENV={envdir} + OS_STDOUT_NOCAPTURE=False + OS_STDERR_NOCAPTURE=False deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} - -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt commands = stestr run {posargs} @@ -29,18 +30,40 @@ commands = {posargs} [testenv:cover] setenv = - {[testenv]setenv} - PYTHON=coverage run --source keystonemiddleware --parallel-mode + {[testenv]setenv} + PYTHON=coverage run --source keystonemiddleware --parallel-mode commands = - stestr run {posargs} - coverage combine - coverage html -d cover - coverage xml -o cover/coverage.xml + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:debug] - commands = oslo_debug_helper -t keystonemiddleware/tests {posargs} +[testenv:docs] +deps = -r{toxinidir}/doc/requirements.txt +commands= + doc8 doc/source + sphinx-build -W -b html doc/source doc/build/html + +[testenv:pdf-docs] +envdir = {toxworkdir}/docs +deps = {[testenv:docs]deps} +allowlist_externals = + make + rm +commands = + rm -rf doc/build/pdf + sphinx-build -W -b latex doc/source doc/build/pdf + make -C doc/build/pdf + +[testenv:releasenotes] +envdir = {toxworkdir}/docs +deps = -r{toxinidir}/doc/requirements.txt +commands = + sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html + [flake8] # D100: Missing docstring in public module # D101: Missing docstring in public class @@ -55,30 +78,9 @@ ignore = D100,D101,D102,D103,D104,D107,D401,W503,W504 show-source = True exclude = .venv,.tox,dist,doc,*egg,build -[testenv:docs] -deps = -r{toxinidir}/doc/requirements.txt -commands= - doc8 doc/source - sphinx-build -W -b html doc/source doc/build/html - -[testenv:pdf-docs] -envdir = {toxworkdir}/docs -deps = {[testenv:docs]deps} -allowlist_externals = - make - rm -commands = - rm -rf doc/build/pdf - sphinx-build -W -b latex doc/source doc/build/pdf - make -C doc/build/pdf - -[testenv:releasenotes] -deps = -r{toxinidir}/doc/requirements.txt -commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html - [hacking] import_exceptions = - keystonemiddleware.i18n + keystonemiddleware.i18n [doc8] extensions = .rst, .yaml