language: php

sudo: false

php:
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - nightly

matrix:
  allow_failures:
    - php: nightly
  fast_finish: true

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

install:
  - travis_retry composer install --no-interaction

script:
  - ./vendor/bin/phpunit -v --coverage-text --coverage-clover=./build/logs/clover.xml

after_script:
  - if [ -f ./build/logs/clover.xml ]; then wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar; fi
  - if [ -f ./build/logs/clover.xml ]; then php ./php-coveralls.phar -v; fi
  - if [ -f ./build/logs/clover.xml ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  - if [ -f ./build/logs/clover.xml ]; then php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi

language: php

sudo: false

php:
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - nightly

matrix:
  allow_failures:
    - php: nightly
  fast_finish: true

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

install:
  - travis_retry composer install --no-interaction

script:
  - ./vendor/bin/phpunit -v --coverage-text --coverage-clover=./build/logs/clover.xml

after_success:
  - if [ -f ./build/logs/clover.xml ]; then wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar; fi
  - if [ -f ./build/logs/clover.xml ]; then php ./php-coveralls.phar -v; fi
  - if [ -f ./build/logs/clover.xml ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  - if [ -f ./build/logs/clover.xml ]; then php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi

Use after_success hook for coverage related scripts
Use after_success hook for coverage related scripts
