language: python
cache: pip
python:
  - "2.7"
services:
  - elasticsearch
  - postgresql
addons:
  postgresql: "9.6"
before_script:
  - sleep 10
install:
  - cat requirements/base.txt | grep "^Django==\|^psycopg2" | xargs pip install
  - pip install -r requirements/pkg.txt
script:
  - python manage.py test --tag=pkg
  - pip install -r requirements/ci.txt
  - coverage run --source='.' manage.py test -v 2
  - coverage report
after_success:
  - coveralls
env:
  global:
    - TOLA_DB_ENGINE=django.db.backends.postgresql_psycopg2
    - TOLA_DB_NAME=test
    - TOLA_DB_USER=postgres
    - TOLA_DB_PASS=
    - TOLA_DB_PORT=5432
    - TOLA_TRACK_SYNC_ENABLED=False
    - ELASTICSEARCH_URL=http://127.0.0.1:9200/
    - COVERALLS_REPO_TOKEN=e4x1YSoHzZd9c7lmIu880ghTMniH24YLq
    - DEFAULT_ORG=TolaData

language: python
cache: pip
python:
  - "2.7"
services:
  - elasticsearch
  - postgresql
addons:
  postgresql: "9.6"
before_script:
  - sleep 10
  - psql -c 'create database tolaactivity;' -U postgres
install:
  - cat requirements/base.txt | grep "^Django==\|^psycopg2" | xargs pip install
  - pip install -r requirements/pkg.txt
script:
  - python manage.py test --tag=pkg
  - pip install -r requirements/ci.txt
  - TOLA_DB_NAME=tolaactivity python manage.py makemigrations --check --dry-run
  - coverage run --source='.' manage.py test -v 2
  - coverage report
after_success:
  - coveralls
env:
  global:
    - TOLA_DB_ENGINE=django.db.backends.postgresql_psycopg2
    - TOLA_DB_NAME=test
    - TOLA_DB_USER=postgres
    - TOLA_DB_PASS=
    - TOLA_DB_PORT=5432
    - TOLA_TRACK_SYNC_ENABLED=False
    - ELASTICSEARCH_URL=http://127.0.0.1:9200/
    - COVERALLS_REPO_TOKEN=e4x1YSoHzZd9c7lmIu880ghTMniH24YLq
    - DEFAULT_ORG=TolaData

Add Travis check for missing migration files
Add Travis check for missing migration files

Makes makemigrations exit with error code 1 when no migrations are
created.
