language: php

php:
  - 5.5
  - 5.6
  - hhvm
  - hhvm-nightly

matrix:
  fast_finish: true
  allow_failures:
    - php: hhvm
    - php: hhvm-nightly

sudo: false

cache:
  directories:
    - vendor

install:
  - travis_retry composer self-update && composer --version
  - travis_retry composer global require "fxp/composer-asset-plugin:~1.1"
  - export PATH="$HOME/.composer/vendor/bin:$PATH"
  - travis_retry composer install --prefer-dist --no-interaction

script:
  - phpunit --verbose --coverage-clover=coverage/coverage.clover

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