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