Merge "[tox] Optimise docs actions"

This commit is contained in:
Zuul 2021-10-06 14:55:08 +00:00 committed by Gerrit Code Review
commit e69d380f4b
1 changed files with 12 additions and 7 deletions

19
tox.ini
View File

@ -44,32 +44,37 @@ deps =
commands = {posargs}
[testenv:docs]
skip_install = true
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -W --keep-going -b html doc/source doc/build/html
rm -rf doc/build/html
sphinx-build -n -W --keep-going -b html doc/source doc/build/html
whereto doc/source/_extra/.htaccess doc/test/redirect-tests.txt
[testenv:deploy-guide]
skip_install = {[testenv:docs]skip_install}
deps = {[testenv:docs]deps}
commands =
rm -rf deploy-guide/build
sphinx-build -a -E -W -d deploy-guide/build/doctrees --keep-going -b html deploy-guide/source deploy-guide/build/html
rm -rf deploy-guide/build/html
sphinx-build -n -W --keep-going -b html deploy-guide/source deploy-guide/build/html
[testenv:pdf-docs]
allowlist_externals = make
skip_install = {[testenv:docs]skip_install}
deps = {[testenv:docs]deps}
commands =
sphinx-build -W --keep-going -b latex doc/source doc/build/pdf
rm -rf doc/build/pdf
sphinx-build -n -W --keep-going -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:releasenotes]
skip_install = {[testenv:docs]skip_install}
deps = {[testenv:docs]deps}
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
rm -rf releasenotes/build/html
sphinx-build -n -W --keep-going -b html releasenotes/source releasenotes/build/html
[testenv:linters]
# Env vars and deps need to be defined in top level tox env