Dep's should be restricted by upper-constraints

Tox trying to install latest versions for building docs which may
not be supported by stable and lower branches, so should be
restricted by respective version's upper-constraints.txt

Change-Id: Ic2d0f0a49ff279fe7322a9c6b3a179b5e8e04708
This commit is contained in:
wu.shiming 2020-11-17 14:10:22 +08:00 committed by wushiming
parent 08757f27db
commit 54b4fa53ad

15
tox.ini
View File

@ -16,20 +16,17 @@ whitelist_externals =
rm
env
make
install_command = {[testenv:common-constraints]install_command}
setenv =
VIRTUAL_ENV={envdir}
OS_TEST_PATH=cyborg/tests/unit
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = rm -f .testrepository/times.dbm
stestr run --slowest {posargs}
[testenv:common-constraints]
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
[testenv:genpolicy]
sitepackages = False
envdir = {toxworkdir}/venv
@ -66,10 +63,6 @@ commands =
bash tools/check-cherry-picks.sh
doc8 doc/source/ CONTRIBUTING.rst HACKING.rst README.rst
[testenv:pep8-constraints]
install_command = {[testenv:common-constraints]install_command}
commands = flake8 {posargs}
[testenv:fast8]
description =
Run style checks on the changes made since HEAD~. For a full run including docs, use 'pep8'
@ -95,7 +88,9 @@ ignore-path = .venv,.git,.tox,*cyborg/locale*,*lib/python*,*cyborg.egg*,api-ref/
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build/html
sphinx-build -W -b html doc/source doc/build/html
@ -109,7 +104,7 @@ commands =
make -C doc/build/pdf
[testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt
deps = {[testenv:docs]deps}
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:debug]