tox: fix py3 / docs gates

Bump version of tox to 4.02 and add requirements for the docs.

Change-Id: Ib4131d1278d742a4730935240b59e6b0e3d94555
This commit is contained in:
Adrian Vladu 2023-01-17 16:06:44 +02:00
parent ea5e8da627
commit e09af5f15b
2 changed files with 19 additions and 12 deletions

10
doc/requirements.txt Normal file
View File

@ -0,0 +1,10 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
openstackdocstheme>=1.31.2 # Apache-2.0
sphinx_rtd_theme
# releasenotes
reno>=2.5.0 # Apache-2.0

21
tox.ini
View File

@ -1,10 +1,9 @@
[tox]
minversion = 1.6
envlist = docs,py37,pep8
minversion = 4.0.2
envlist = py3,pep8
skipsdist = True
[testenv]
basepython = python3
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
deps =
@ -17,7 +16,6 @@ commands = stestr run --slowest {posargs}
commands = flake8 {posargs}
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source cloudbaseinit --parallel-mode
@ -29,21 +27,20 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:releasenotes]
basepython = python3
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:docs]
basepython = python3
deps =
sphinx_rtd_theme
-r{toxinidir}/doc/requirements.txt
-egit+https://github.com/openstack/cloudbase-init\#egg=cloudbase-init
commands =
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
# E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301