From e09af5f15b578fdcbf8d2f9a0261f1fa3cd3a83e Mon Sep 17 00:00:00 2001 From: Adrian Vladu Date: Tue, 17 Jan 2023 16:06:44 +0200 Subject: [PATCH] tox: fix py3 / docs gates Bump version of tox to 4.02 and add requirements for the docs. Change-Id: Ib4131d1278d742a4730935240b59e6b0e3d94555 --- doc/requirements.txt | 10 ++++++++++ tox.ini | 21 +++++++++------------ 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 00000000..3180aac3 --- /dev/null +++ b/doc/requirements.txt @@ -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 diff --git a/tox.ini b/tox.ini index 0291fa5a..7253154d 100644 --- a/tox.ini +++ b/tox.ini @@ -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