# .travis.yml
# Configuration file for Travis-CI.org hosted testing

language: python

python:
  - "2.7"

branches:
  only:
    - master

services:
  - postgresql
  - rabbitmq

before_install:
  - sudo apt-get install -qq libevent-dev libpq-dev

install:
  - "pip install -r requirements.txt --use-mirrors"
  - "pip install coveralls --use-mirrors"

before_script:
  - "psql -c 'create database deis_testing;' -U postgres"
  - |
    cat > deis/local_settings.py <<EOF
    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.postgresql_psycopg2',
            'NAME': 'deis_testing',
            'USER': 'postgres',
            'PASSWORD': '',
            'HOST': '',
            'PORT': '',
        }
    }
    SECRET_KEY = ')9$y9(@_r!+ai=ub)wsp2!!vsfaker7ke9!jaljgf1_@rw421='
    EOF

script:
  - coverage run manage.py test api celerytasks web

after_success:
  - coveralls
