language: php

php:
  - 7.3
  - 7.4
  - 8.0

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

before_script:
  - travis_retry composer self-update
  - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source

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

after_script:
  - php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
