tox: use Python 3 where possible
Time to say goodbye for Python 2 Depends-On: https://review.opendev.org/693356 Change-Id: I5f23da932df70bf17d09d42420ac408221d0e02f
This commit is contained in:
@@ -14,7 +14,7 @@ gpgcheck=1
|
||||
gpgkey=$DOCKER_REPOS_MIRROR_URL/centos/gpg
|
||||
EOF
|
||||
|
||||
sudo yum -y install docker-ce
|
||||
sudo yum -y install docker-ce python3
|
||||
|
||||
# Disable SELinux
|
||||
setenforce 0
|
||||
|
||||
23
tox.ini
23
tox.ini
@@ -1,9 +1,10 @@
|
||||
[tox]
|
||||
minversion = 2.5.0
|
||||
skipsdist = True
|
||||
envlist = pep8,py27,py37,pypy
|
||||
envlist = pep8,py37,pypy
|
||||
|
||||
[testenv]
|
||||
basepython = python3
|
||||
usedevelop=True
|
||||
whitelist_externals = find
|
||||
rm
|
||||
@@ -20,11 +21,22 @@ commands =
|
||||
stestr run {posargs}
|
||||
stestr slowest
|
||||
|
||||
[testenv:py27]
|
||||
basepython = python2.7
|
||||
|
||||
[testenv:py36]
|
||||
basepython = python3.6
|
||||
|
||||
[testenv:py37]
|
||||
basepython = python3.7
|
||||
|
||||
[testenv:pypy]
|
||||
basepython = pypy
|
||||
|
||||
[testenv:debug]
|
||||
commands = oslo_debug_helper -t kolla/tests {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
NOSE_WITH_COVERAGE=1
|
||||
NOSE_COVER_BRANCHES=1
|
||||
@@ -39,7 +51,6 @@ commands =
|
||||
coverage report --show-missing
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
yamllint
|
||||
@@ -56,7 +67,6 @@ commands =
|
||||
commands = bandit --skip B303 -r docker kolla tests tools
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
@@ -64,7 +74,6 @@ deps =
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/requirements.txt
|
||||
@@ -76,7 +85,6 @@ commands =
|
||||
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
||||
|
||||
[testenv:pdf-docs]
|
||||
basepython = python3
|
||||
whitelist_externals = make
|
||||
deps = {[testenv:docs]deps}
|
||||
commands =
|
||||
@@ -149,14 +157,12 @@ commands=
|
||||
oslo-config-generator --config-file etc/oslo-config-generator/kolla-build.conf
|
||||
|
||||
[testenv:releasenotes]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands =
|
||||
rm -rf releasenotes/build
|
||||
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[testenv:bindep]
|
||||
basepython = python3
|
||||
# Do not install any requirements. We want this to be fast and work even if
|
||||
# system dependencies are missing, since it's used to tell you what system
|
||||
# dependencies are missing! This also means that bindep must be installed
|
||||
@@ -173,7 +179,6 @@ exclude=.eggs,.git,.tox,doc
|
||||
local-check-factory = kolla.hacking.checks.factory
|
||||
|
||||
[testenv:lower-constraints]
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{toxinidir}/lower-constraints.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
Reference in New Issue
Block a user