language: php

sudo: false

cache:
  directories:
    - $HOME/.composer/cache

env:
  matrix:
    - PREFER_LOWEST="--prefer-lowest"
    - PREFER_LOWEST=""

php:
  - 5.6
  - 7.0
  - 7.1
  - 7.2

install:
  - composer update --no-interaction --prefer-stable $PREFER_LOWEST

script:
  - vendor/bin/phpunit --verbose

after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.xml

matrix:
  fast_finish: true
