First pass at getting tox and travis working

This commit is contained in:
James Laska
2016-06-02 11:18:33 -04:00
parent 1208450f59
commit f3c186310b
2 changed files with 74 additions and 38 deletions

40
.travis.yml Normal file
View File

@@ -0,0 +1,40 @@
sudo: required
dist: trusty
language: python
python:
- '2.7'
env:
- TOXENV=api-lint
- TOXENV=api
- TOXENV=ui-lint
- TOXENV=ui
install:
- pip install tox
script:
- tox
after_success:
- TOXENV=coveralls tox
addons:
apt:
packages:
# - libssl-dev
# - libxmlsec1
# - libxmlsec1-dev
# - libxmlsec1-openssl
# - libxslt1-dev
# - pkg-config
# - swig
# The following were used when manually testing on an ubuntu trusty container
- make
- git
- swig
- python-tz
- python-dev
- libpq-dev
- libxmlsec1-dev
- libsasl2-dev
- libldap2-dev
- libssl-dev
- libffi-dev
- libevent-dev
- python-all-dev

72
tox.ini
View File

@@ -1,50 +1,46 @@
[tox] [tox]
envlist = envlist =
py26-dj14, py27-dj14, py26-dj15, py27-dj15, py26-dj16, py27-dj16 api-lint,
ui-lint,
api,
ui,
coveralls
[testenv] [testenv]
commands = python manage.py test main basepython = python2.7
deps =
ansible==1.3.4
python-ldap
setenv = setenv =
DJANGO_SETTINGS_MODULE = awx.settings.development DJANGO_SETTINGS_MODULE = awx.settings.development_quiet
# For OS X to be able to install pycrypto. # For OS X to be able to install pycrypto.
CFLAGS=-I/opt/local/include CFLAGS = -I/opt/local/include
downloadcache = {toxworkdir}/cache HOME = {homedir}
USERPROFILE = {homedir}
[testenv:py26-dj14]
basepython = python2.6
deps = deps =
Django==1.4.10 -r{toxinidir}/requirements/requirements.txt
{[testenv]deps} -r{toxinidir}/requirements/requirements_dev.txt
coverage
coveralls
nodeenv
[testenv:py27-dj14] [testenv:api-lint]
basepython = python2.7 commands =
deps = make flake8
Django==1.4.10 coverage erase
{[testenv]deps}
[testenv:py26-dj15] [testenv:ui-lint]
basepython = python2.6 commands =
deps = make jshint
Django==1.5.5
{[testenv]deps}
[testenv:py27-dj15] [testenv:api]
basepython = python2.7 commands =
deps = coverage run --parallel -m pytest --create-db --source awx/main/tests {posargs}
Django==1.5.5
{[testenv]deps}
[testenv:py26-dj16] [testenv:ui]
basepython = python2.6 commands =
deps = make UI_TEST_MODE=CI test-ui
Django==1.6
{[testenv]deps} [testenv:coveralls]
commands=
coverage combine
coverage report -m
coveralls
[testenv:py27-dj16]
basepython = python2.7
deps =
Django==1.6
{[testenv]deps}