language: php

sudo: false

php:
  - 5.6
  - 7.0
  - 7.1
  - hhvm

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

before_install:
  - rm composer.lock

install:
  - composer install --prefer-dist --no-interaction

before_script:
  - mkdir -p build/logs

script:
  - ./vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml

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