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

language: python

python:
  - "2.7"

services:
  - postgresql

env:
  - FLEETCTL_TUNNEL=foo

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

install:
  - pip install -r controller/requirements.txt
  - pip install -r controller/dev_requirements.txt coveralls
  - go get code.google.com/p/go.tools/cmd/cover

before_script:
  - "psql -c 'create database deis_testing;' -U postgres"
  - |
    cat > controller/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 -C controller flake8
  - make -C controller coverage
  - make -C docs
  - make -C logger test

after_success:
  - cd controller && coveralls
