Add basic tox targets for pep8 and build test

This commit is contained in:
James Page 2016-07-01 10:31:25 +01:00
parent 0e4963b834
commit 095f04aba5
4 changed files with 33 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
.tox .tox
build

View File

@ -1 +1,2 @@
includes: ['layer:openstack'] includes: ['layer:openstack']
repo: 'https://github.com/openstack/charm-layer-openstack-principle'

5
requirements.txt Normal file
View File

@ -0,0 +1,5 @@
# Requirements to build the layer
charm-tools
ruamel.yaml==0.10.12
simplejson
flake8

26
tox.ini Normal file
View File

@ -0,0 +1,26 @@
[tox]
skipsdist = True
envlist = pep8,build
[testenv]
basepython = python2.7
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
TERM=linux
JUJU_REPOSITORY={toxinidir}/build
passenv = http_proxy https_proxy
install_command =
pip install {opts} {packages}
deps =
-r{toxinidir}/requirements.txt
whitelist_externals = /bin/true
[testenv:build]
commands =
charm-build --log-level DEBUG -o {toxinidir}/build .
[testenv:venv]
commands = {posargs}
[testenv:pep8]
commands = /bin/true