language: python

python:
  - "2.7"

sudo: required

services:
  - docker

env:
  global:
    - DOCKER_VERSION=1.12.0-0~trusty
    - DOCKER_COMPOSE_VERSION=1.6.2

before_install:
  - apt-cache madison docker-engine
  - sudo apt-get -o Dpkg::Options::="--force-confnew" install -y docker-engine=${DOCKER_VERSION}
  - 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

cache:
  directories:
    - $HOME/.cache/pip
    - /var/lib/docker

before_script:
  - docker-compose up -d db
  - docker-compose run documentregister setuplocaldb

script:
  - docker-compose run documentregister test

language: python

python:
  - "2.7"

sudo: required

services:
  - docker

env:
  global:
    - DOCKER_VERSION=1.12.0-0~trusty
    - DOCKER_COMPOSE_VERSION=1.6.2

before_install:
  - apt-cache madison docker-engine
  - sudo apt-get -o Dpkg::Options::="--force-confnew" install -y docker-engine=${DOCKER_VERSION}
  - sudo rm -f /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

cache:
  directories:
    - $HOME/.cache/pip
    - /var/lib/docker

before_script:
  - docker-compose up -d db
  - docker-compose run documentregister setuplocaldb

script:
  - docker-compose run documentregister test

Remove docker-compose only if it exists
Remove docker-compose only if it exists

force the removal of docker-compose so it does not error if the file
does not exist
