Set up initial Gerrit requirements
* Add .gitreview * Add .zuul.yaml with basic linters and pep8 jobs * Fix up tox.ini to run linters and pep8 environments. This changed some leagacy config in the default testenv that will affect the more specific environments. Change-Id: I02a81c5179141efb056cd030819af6387ba7a13c Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
parent
640ee2a980
commit
151ae48ca4
|
@ -0,0 +1,4 @@
|
||||||
|
[gerrit]
|
||||||
|
host=review.openstack.org
|
||||||
|
port=29418
|
||||||
|
project=openstack/stx-distcloud-client.git
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- project:
|
||||||
|
check:
|
||||||
|
jobs:
|
||||||
|
- openstack-tox-linters
|
||||||
|
- openstack-tox-pep8:
|
||||||
|
voting: false
|
||||||
|
gate:
|
||||||
|
jobs:
|
||||||
|
- openstack-tox-linters
|
|
@ -11,3 +11,6 @@ mock>=2.0 # BSD
|
||||||
nose # LGPL
|
nose # LGPL
|
||||||
tempest>=14.0.0 # Apache-2.0
|
tempest>=14.0.0 # Apache-2.0
|
||||||
testtools>=1.4.0 # MIT
|
testtools>=1.4.0 # MIT
|
||||||
|
|
||||||
|
PyYAML>=3.1.0
|
||||||
|
yamllint>=0.5.2
|
||||||
|
|
30
tox.ini
30
tox.ini
|
@ -1,19 +1,22 @@
|
||||||
[tox]
|
[tox]
|
||||||
minversion = 2.0
|
minversion = 2.3
|
||||||
envlist = py27,pep8
|
envlist = py27,pep8
|
||||||
# Tox does not work if the path to the workdir is too long, so move it to /tmp
|
|
||||||
toxworkdir = /tmp/{env:USER}_distributedcloud-client
|
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
basepython = python3
|
||||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
DISCOVER_DIRECTORY=dcmanagerclient/tests
|
OS_STDOUT_CAPTURE=1
|
||||||
deps = -r{toxinidir}/requirements.txt
|
OS_STDERR_CAPTURE=1
|
||||||
-r{toxinidir}/test-requirements.txt
|
OS_TEST_TIMEOUT=60
|
||||||
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
# DISCOVER_DIRECTORY=dcmanagerclient/tests
|
||||||
|
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
#deps = -r{toxinidir}/requirements.txt
|
||||||
|
# -r{toxinidir}/test-requirements.txt
|
||||||
|
#commands = python setup.py testr --slowest --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8 {posargs}
|
commands = flake8 {posargs}
|
||||||
|
@ -33,3 +36,14 @@ show-source = True
|
||||||
ignore = E123,E125
|
ignore = E123,E125
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*openstack/common*,*egg,build
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*openstack/common*,*egg,build
|
||||||
|
|
||||||
|
[testenv:linters]
|
||||||
|
# bashate ignore:
|
||||||
|
# E006 - accept long lines
|
||||||
|
# E040 - false positive on |& syntax (new in bash 4)
|
||||||
|
whitelist_externals = bash
|
||||||
|
commands =
|
||||||
|
bash -c "find {toxinidir} \
|
||||||
|
\( -name .tox -prune \) \
|
||||||
|
-o -type f -name '*.yaml' \
|
||||||
|
-print0 | xargs -0 yamllint"
|
||||||
|
|
Loading…
Reference in New Issue