language: php

php:
  - 7

sudo: false

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

before_install:
  - composer validate

before_script:
  - travis_retry composer self-update
  - travis_retry composer update --no-interaction --prefer-source

script:
  - ./vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

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