[CI] Install dependencies for docs target

When tox 'docs' target is called, first it installs the dependencies
(listed in 'deps') in 'installdeps' phase, then it installs masakari
(with its requirements) in 'develop-inst' phase. In the latter case
'deps' is not used so that the constraints defined in 'deps' are not
used. This could lead to failures on stable branches when new packages
are released that break the build. To avoid this, the simplest solution
is to pre-install requirements, i.e. add requirements.txt to 'docs' tox
target.

Change-Id: Ic5e214be240023f0e4f02cae3939e1d199ecb061
This commit is contained in:
Elod Illes 2022-04-28 20:03:43 +02:00
parent 894e22f6a9
commit aa13e4536e
1 changed files with 4 additions and 0 deletions

View File

@ -78,7 +78,11 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:docs]
# NOTE(elod.illes): requirements.txt is needed because otherwise
# dependencies are installed during 'develop-inst' tox phase without
# constraints which could cause failures in stable branches.
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html doc/source doc/build/html