sudo: required

language: python

python:
  - "3.3"
  - "3.4"
  - "3.5"
  - "3.6"
services:
  - docker

before_install:
    - sudo apt-get update
    - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-engine
    - sudo rm /usr/local/bin/docker-compose
    - curl -L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m` > docker-compose
    - chmod +x docker-compose
    - sudo mv docker-compose /usr/local/bin
    - docker-compose -v
    - docker -v
    - docker ps
    - pip install pep8

install:
  - "pip install flask"
  - "pip install -r ./tests/requirements.txt"

before_script:
  - docker-compose up -d --build
  - mongo --nodb wait_for_mongo.js
  - docker ps

script:
  - pytest tests/
  - pep8 --max-line-length=100 .

after_script:
  - docker-compose down

sudo: required

language: python

python:
  - "3.3"
  - "3.4"
  - "3.5"
  - "3.6"
services:
  - docker

before_install:
    - sudo apt-get update
    - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-engine
    - sudo rm /usr/local/bin/docker-compose
    - curl -L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m` > docker-compose
    - chmod +x docker-compose
    - sudo mv docker-compose /usr/local/bin
    - docker-compose -v
    - docker -v
    - docker ps
    - pip install pep8

install:
  - "pip install flask"
  - "pip install -r ./tests/requirements.txt"

before_script:
  - docker-compose up -d --build
  - mongo --nodb wait_for_mongo.js
  - sleep 5
  - docker ps

script:
  - pytest tests/
  - pep8 --max-line-length=100 .

after_script:
  - docker-compose down

Add small sleep after mongo startup again
Add small sleep after mongo startup again
