Add missing api-ref envlist to tox

This is a follow-up to:
https://review.opendev.org/c/openstack/cloudkitty/+/867122

We need to add the `[testenv:api-ref]` section to `tox.ini` to be able
to run `tox -e api-ref`, which is what Zuul uses to build the API refs.

Sphinx had to be capped to the latest version 4 or otherwise `tox` fails
with the "add_content() takes 2 positional arguments but 3 were given"
error message.

Change-Id: I65b008152e2bc64f29229996c87ad4587fe85043
This commit is contained in:
Mariusz Karpiarz 2022-12-14 12:13:12 +00:00
parent 3a90e20130
commit 524e37da18
3 changed files with 11 additions and 1 deletions

1
api-ref/source/_static Symbolic link
View File

@ -0,0 +1 @@
../../doc/source/_static

View File

@ -1,4 +1,4 @@
sphinx>=3.3.1 # BSD
sphinx>=3.3.1,<5.0.0 # BSD
openstackdocstheme>=2.2.6 # Apache-2.0
sphinxcontrib-httpdomain>=1.7.0 # BSD
sphinxcontrib-pecanwsme>=0.10.0 # Apache-2.0

View File

@ -66,6 +66,15 @@ commands = sphinx-build -W --keep-going -b html doc/source doc/build/html
# sphinx-build -W --keep-going -b latex doc/source doc/build/pdf
# make -C doc/build/pdf
[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to docs.openstack.org.
deps = -r{toxinidir}/doc/requirements.txt
allowlist_externals = rm
commands =
rm -rf api-ref/build
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[testenv:venv]
commands = {posargs}