tox 4 compatibility

Remove 'usedevelop = true' and 'skipsdist = true', the combination of
which now means we don't install dependencies. Also remove the
basepython setting, which is no longer needed since we don't have any
Python 2-first distros to worry about. Finally, remove the
lower-constraints job and we no longer test for these.

Change-Id: I5b4b8cc1facb6e18cf12d33ea8113d47a0a76235
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2023-02-16 10:24:37 +00:00
parent 58ff270a9c
commit 12900da15b
2 changed files with 15 additions and 20 deletions

View File

@ -2,7 +2,6 @@
- project: - project:
templates: templates:
- check-requirements - check-requirements
- openstack-lower-constraints-jobs
- openstack-python3-antelope-jobs - openstack-python3-antelope-jobs
- osc-tox-unit-tips - osc-tox-unit-tips
- publish-openstack-docs-pti - publish-openstack-docs-pti

34
tox.ini
View File

@ -1,12 +1,8 @@
[tox] [tox]
minversion = 2.0 minversion = 3.1
envlist = py38,pep8 envlist = py3,pep8
skipsdist = True
ignore_basepython_conflict = true
[testenv] [testenv]
basepython = python3
usedevelop = True
setenv = setenv =
OS_STDOUT_CAPTURE=1 OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1 OS_STDERR_CAPTURE=1
@ -15,8 +11,8 @@ deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
commands = stestr run {posargs} commands =
whitelist_externals = stestr stestr run {posargs}
[testenv:unit-tips] [testenv:unit-tips]
commands = commands =
@ -25,16 +21,17 @@ commands =
python -m pip install -q -e "git+file://{toxinidir}/../openstacksdk#egg=openstacksdk" python -m pip install -q -e "git+file://{toxinidir}/../openstacksdk#egg=openstacksdk"
python -m pip freeze python -m pip freeze
stestr run {posargs} stestr run {posargs}
whitelist_externals = stestr
[testenv:pep8] [testenv:pep8]
deps = deps =
hacking>=3.0.1,<3.1.0 # Apache-2.0 hacking>=3.0.1,<3.1.0 # Apache-2.0
flake8-import-order>=0.17.1 # LGPLv3 flake8-import-order>=0.17.1 # LGPLv3
commands = flake8 commands =
flake8
[testenv:venv] [testenv:venv]
commands = {posargs} commands =
{posargs}
[testenv:cover] [testenv:cover]
commands = commands =
@ -42,7 +39,8 @@ commands =
coverage report coverage report
[testenv:debug] [testenv:debug]
commands = oslo_debug_helper -t osc_lib/tests {posargs} commands =
oslo_debug_helper -t osc_lib/tests {posargs}
[testenv:docs] [testenv:docs]
deps = deps =
@ -55,7 +53,11 @@ commands =
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
[testenv:releasenotes] [testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8] [flake8]
show-source = True show-source = True
@ -66,9 +68,3 @@ ignore = W504
import-order-style = pep8 import-order-style = pep8
application-import-names = osc_lib application-import-names = osc_lib
filename = *.py filename = *.py
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt