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

language: python

python:
  - "2.7"

branches:
  only:
    - master
    - develop

services:
  - postgresql
  - rabbitmq

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

install:
  - pip install -r dev_requirements.txt 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 = 'TotallyFake-SECRET_KEY-ForTravisCI'
    EOF

script:
  - make flake8
  - make coverage
  - make -C docs

after_success:
  - coveralls
