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
4
.gitreview
Normal file
4
.gitreview
Normal file
@ -0,0 +1,4 @@
|
||||
[gerrit]
|
||||
host=review.openstack.org
|
||||
port=29418
|
||||
project=openstack/stx-distcloud-client.git
|
10
.zuul.yaml
Normal file
10
.zuul.yaml
Normal file
@ -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
|
||||
tempest>=14.0.0 # Apache-2.0
|
||||
testtools>=1.4.0 # MIT
|
||||
|
||||
PyYAML>=3.1.0
|
||||
yamllint>=0.5.2
|
||||
|
30
tox.ini
30
tox.ini
@ -1,19 +1,22 @@
|
||||
[tox]
|
||||
minversion = 2.0
|
||||
minversion = 2.3
|
||||
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
|
||||
|
||||
[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}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
DISCOVER_DIRECTORY=dcmanagerclient/tests
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
||||
OS_STDOUT_CAPTURE=1
|
||||
OS_STDERR_CAPTURE=1
|
||||
OS_TEST_TIMEOUT=60
|
||||
# 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]
|
||||
commands = flake8 {posargs}
|
||||
@ -33,3 +36,14 @@ show-source = True
|
||||
ignore = E123,E125
|
||||
builtins = _
|
||||
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…
x
Reference in New Issue
Block a user