sudo: required

services:
  - docker

language: python

python:
  - 3.6

env:
  - DOCKER_COMPOSE_VERSION=1.21.2

before_install:
  - sudo rm /usr/local/bin/docker-compose
  - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin
  - pip install codecov pytest-cov
  - sudo mkdir -p /tmp/coverage
  - sudo chmod a+w /tmp/coverage

install:
  - make build
  - docker-compose up -d

script:
  - docker-compose run -v /tmp/coverage:/tmp/coverage web bash -c "COVERAGE_FILE=/tmp/coverage/.coverage pytest --cov-report= --cov=."

after_success:
  - mv /tmp/coverage/.coverage .coverage.docker
  - coverage combine
  - codecov

deploy:
  - provider: script
    script: bash -c "docker login -u grandchallenge -p "$DOCKER_PASSWORD" && make push"
    on:
      branch: master
  - provider: script
    script: bash -c "docker login -u grandchallenge -p "$DOCKER_PASSWORD" && make push"
    on:
      branch: eyra-master

sudo: required

services:
  - docker

language: python

python:
  - 3.6

env:
  - DOCKER_COMPOSE_VERSION=1.21.2

before_install:
  - sudo rm /usr/local/bin/docker-compose
  - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin
  - pip install codecov pytest-cov
  - sudo mkdir -p /tmp/coverage
  - sudo chmod a+w /tmp/coverage
  - sudo service postgresql stop

install:
  - make build
  - docker-compose up -d

script:
  - docker-compose run -v /tmp/coverage:/tmp/coverage web bash -c "COVERAGE_FILE=/tmp/coverage/.coverage pytest --cov-report= --cov=."

after_success:
  - mv /tmp/coverage/.coverage .coverage.docker
  - coverage combine
  - codecov

deploy:
  - provider: script
    script: bash -c "docker login -u grandchallenge -p "$DOCKER_PASSWORD" && make push"
    on:
      branch: master
  - provider: script
    script: bash -c "docker login -u grandchallenge -p "$DOCKER_PASSWORD" && make push"
    on:
      branch: eyra-master

Fix clash with Travis postgres server
Fix clash with Travis postgres server
