Add gate jobs

Set ``toxworkdir`` to avoud charm-tools build recursion.

Change-Id: Ia9ed0f5e8e17d9d0ffdf3e650c76f2c36938244d
This commit is contained in:
Frode Nordahl 2019-03-04 08:16:47 +01:00
parent 38aa19a386
commit 96b969b6c0
No known key found for this signature in database
GPG Key ID: 6A5D59A3BA48373F
4 changed files with 10 additions and 35 deletions

4
.gitreview Normal file
View File

@ -0,0 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/charm-layer-ceph.git

View File

@ -1,9 +0,0 @@
language: python
python:
- "3.6"
install: pip install tox-travis charm-tools
env:
- ENV=pep8
- ENV=build
script:
- tox -e $ENV --workdir /tmp/tox

3
.zuul.yaml Normal file
View File

@ -0,0 +1,3 @@
- project:
templates:
- python-charm-layer-jobs

29
tox.ini
View File

@ -1,9 +1,10 @@
[tox]
skipsdist = True
envlist = pep8
toxworkdir = /tmp/tox
[testenv]
basepython = python2.7
basepython = python3
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
TERM=linux
@ -18,37 +19,13 @@ whitelist_externals = /bin/true /bin/echo /bin/mkdir
[testenv:build]
commands =
/bin/echo 'WARNING: *build* target is for testing only.'
mkdir -p {envdir}/tmp
/bin/mkdir -p {envdir}/tmp
charm-build --log-level DEBUG -o {envdir}/tmp/build .
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:py27]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
# TODO: Need to write unit tests then remove the following command.
commands = /bin/true
[testenv:py34]
basepython = python3.4
deps = -r{toxinidir}/test-requirements.txt
# TODO: Need to write unit tests then remove the following command.
commands = /bin/true
[testenv:py35]
basepython = python3.5
deps = -r{toxinidir}/test-requirements.txt
# TODO: Need to write unit tests then remove the following command.
commands = /bin/true
[testenv:py36]
basepython = python3.6
deps = -r{toxinidir}/test-requirements.txt
# TODO: Need to write unit tests then remove the following command.
commands = /bin/true
[testenv:pep8]
basepython = python3
commands = flake8 --ignore=E402 actions/ reactive/