Disabling python2.7 zuul jobs
Change-Id: I048bc0518ed63eb8299a079fb66ca710f739857b
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
- project:
|
- project:
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-py27
|
|
||||||
- openstack-tox-pep8
|
- openstack-tox-pep8
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-py27
|
|
||||||
- openstack-tox-pep8
|
- openstack-tox-pep8
|
||||||
|
20
tools/flake8wrap.sh
Executable file
20
tools/flake8wrap.sh
Executable 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
21
tox.ini
@@ -1,20 +1,29 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 2.0
|
minversion = 2.0
|
||||||
envlist = py36,py27,pep8
|
envlist = py36,pep8
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
basepython = python3
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install -U {opts} {packages}
|
install_command = pip install -U {opts} {packages}
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
deps = -r{toxinidir}/requirements.txt
|
PYTHONWARNINGS=default::DeprecationWarning
|
||||||
-r{toxinidir}/test-requirements.txt
|
OS_STDOUT_CAPTURE=1
|
||||||
commands = python setup.py test --slowest --testr-args='{posargs}'
|
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]
|
[testenv:pep8]
|
||||||
basepython = python3
|
commands =
|
||||||
commands = flake8
|
bash tools/flake8wrap.sh {posargs}
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
Reference in New Issue
Block a user