sudo: required

services:
  - docker

language: python

python:
  - 3.6

env:
  DOCKER_COMPOSE_VERSION: 1.15.0

before_install:
  - sudo apt-get update
  - 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

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

script:
  - docker-compose run --rm -v /tmp/coverage:/tmp/coverage web dockerize -wait tcp://db:3306 -timeout 30s bash -c "python manage.py collectstatic --noinput && COVERAGE_FILE=/tmp/coverage/.coverage py.test --cov-report= --cov=."

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


sudo: required

services:
  - docker

language: python

python:
  - 3.6

env:
  DOCKER_COMPOSE_VERSION: 1.15.0

before_install:
  - sudo apt-get update
  - 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:
  - docker-compose up --build -d

script:
  - docker-compose run --rm -v /tmp/coverage:/tmp/coverage web dockerize -wait tcp://db:3306 -timeout 30s bash -c "python manage.py collectstatic --noinput && COVERAGE_FILE=/tmp/coverage/.coverage py.test --cov-report= --cov=."

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


Allow all to write coverage
Allow all to write coverage
