image: python:2.7


variables:
  POSTGRES_DB: smash
  POSTGRES_USER: runner
  POSTGRES_PASSWORD: password

before_script:
  - apt-get update && apt-get install -y libsasl2-dev libssl-dev locales locales-all
  - pip install -r requirements.txt --default-timeout=180
  - pip install -r requirements-dev.txt --default-timeout=180

test:
    services:
         - postgres:latest
    script:
         - cp "local_settings_ci.py" "smash/smash/local_settings.py"
         - cd smash
         - python manage.py makemigrations web && python manage.py migrate
         - coverage run --source web manage.py test
         - coverage report -m --omit="*/test*,*/migrations*,*debug_utils*"
