language: php

php:
  - 7.3
  - 7.4

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

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

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
