Disabling python2.7 zuul jobs

Change-Id: I048bc0518ed63eb8299a079fb66ca710f739857b
This commit is contained in:
Anand Shanmugam 2020-05-28 12:49:06 +05:30
parent 597e262d05
commit 7f65e593f1
3 changed files with 35 additions and 8 deletions

View File

@ -1,9 +1,7 @@
- project:
check:
jobs:
- openstack-tox-py27
- openstack-tox-pep8
gate:
jobs:
- openstack-tox-py27
- openstack-tox-pep8

20
tools/flake8wrap.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
#
# A simple wrapper around flake8 which makes it possible
# to ask it to only verify files changed in the current
# git HEAD patch.
#
# Intended to be invoked via tox:
#
# tox -epep8 -- -HEAD
#
if test "x$1" = "x-HEAD" ; then
shift
files=$(git diff --name-only HEAD~1 | tr '\n' ' ')
echo "Running flake8 on ${files}"
diff -u --from-file /dev/null ${files} | flake8 --diff "$@"
else
echo "Running flake8 on all files"
exec flake8 "$@"
fi

21
tox.ini
View File

@ -1,20 +1,29 @@
[tox]
minversion = 2.0
envlist = py36,py27,pep8
envlist = py36,pep8
skipsdist = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args='{posargs}'
PYTHONWARNINGS=default::DeprecationWarning
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
passenv = TEMPEST_* OS_TEST_*
commands =
find . -type f -name "*.py[c|o]" -delete
stestr run {posargs}
[testenv:pep8]
basepython = python3
commands = flake8
commands =
bash tools/flake8wrap.sh {posargs}
[testenv:venv]
basepython = python3