language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - hhvm

matrix:
  allow_failures:
    - php: 7.0

sudo: false

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

script: 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

language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - hhvm

matrix:
  allow_failures:
    - php: 7.0

sudo: false

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

script:
  - if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then vendor/bin/phpunit; fi
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover; fi

after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

Use locally-installed PHPUnit instead of phar; avoid coverage in HHVM
Use locally-installed PHPUnit instead of phar; avoid coverage in HHVM

Avoiding the use of Travis' pre-built phar allows us to work around this
HHVM issue: https://github.com/facebook/hhvm/issues/5215
