dist: xenial   # required for Python >= 3.7
language: python

services:
  - rabbitmq
  - redis-server

python:
  - "3.5"
  - "3.5-dev"
  - "3.6"
  - "3.6-dev"
  - "3.7"
  - "3.7-dev"
  - "3.8"
  - "3.8-dev"
  - "nightly"

matrix:
  allow_failures:
  - python: "3.5"
  - python: "3.5-dev"
  - python: "3.6-dev"
  - python: "3.7-dev"
  - python: "3.8-dev"
  - python: "nightly"

# command to install dependencies
install:
  - make config
  - pip install coveralls

before_script:
  - cp .env.example .env
  - python manage.py silverback update_app_key
  - python manage.py silverback update_env DB_CONNECTION=sqlite
  - python manage.py silverback update_env REDIS_HOST=localhost
  - python manage.py silverback update_env REDIS_PORT=6379
  - python manage.py silverback update_env CELERY_BROKER_URL=amqp://guest:guest@localhost:5672
  - python manage.py silverback update_env CELERY_RESULT_BACKEND=redis://localhost:6379

# command to run tests
script:
  - make ci
  - cat storage/logs/*.log

# Push the results back to coveralls
after_success:
  - coveralls