language: php

php:
  - 7.3

install: travis_retry composer install --no-interaction --prefer-source

script:
  - mkdir -p build/logs
  - vendor/bin/phpunit -c phpunit.xml.dist
  - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
  - vendor/bin/phpunit --coverage-clover build/logs/clover.xml

after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
  - travis_retry php vendor/bin/coveralls -v

notifications:
  slack: red-creek:5lI8ybvl6YTcCNPosh4TE13h