sudo: required

services:
  - docker

branches:
  only:
    - master

env:
  - TARGET="54"
  - TARGET="55"
  - TARGET="56"
  - TARGET="70"

before_install:
  # Docker-compose installation
  - curl -L https://github.com/docker/compose/releases/download/1.4.0/docker-compose-`uname -s`-`uname -m` > docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin

script:
  - make tests TARGET=$TARGET

after_script:
  - cat /var/log/elasticsearch/*.log
  - cat /var/log/nginx/*.log
  - sudo rm composer.lock && sudo composer require satooshi/php-coveralls dev-master --no-ansi --no-progress --no-interaction

after_success:
  - bash <(curl -s https://codecov.io/bash)
  - vendor/bin/coveralls -v
