Disabling python27 unit tests and enabling zuul jobs
Change-Id: I94bec5d6818cbf5d2e58589efdba7799cb6e02e7
This commit is contained in:
parent
0bc7472f23
commit
ace2c424f1
7
.zuul.yaml
Normal file
7
.zuul.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
- project:
|
||||||
|
check:
|
||||||
|
jobs:
|
||||||
|
- openstack-tox-pep8
|
||||||
|
gate:
|
||||||
|
jobs:
|
||||||
|
- 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,22 +1,30 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 2.0
|
minversion = 2.0
|
||||||
envlist = py36,py27,pep8
|
envlist = pep8
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
basepython = python3
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install -U {opts} {packages}
|
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
deps = -r{toxinidir}/requirements.txt
|
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
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands = python setup.py test --slowest --testr-args='{posargs}'
|
passenv = TEMPEST_* OS_TEST_*
|
||||||
|
commands =
|
||||||
|
find . -type f -name "*.py[c|o]" -delete
|
||||||
|
stestr run {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8
|
commands =
|
||||||
|
bash tools/flake8wrap.sh {posargs}
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:genconfig]
|
[testenv:genconfig]
|
||||||
@ -42,7 +50,6 @@ commands = bandit -c bandit.yaml -r cloudpulse -p gate
|
|||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E123, E125 skipped as they are invalid PEP-8.
|
# E123, E125 skipped as they are invalid PEP-8.
|
||||||
|
|
||||||
show-source = True
|
show-source = True
|
||||||
ignore = E123,E125
|
ignore = E123,E125
|
||||||
builtins = _
|
builtins = _
|
||||||
|
Loading…
Reference in New Issue
Block a user