language: php

php:
  - 5.3
  - 5.4
  - 5.5
  - 5.6
  - 7
  - hhvm

matrix:
  include:
    - php: 5.3
      env: dependencies=lowest
    - php: 5.4
      env: dependencies=lowest
    - php: 5.5
      env: dependencies=lowest
    - php: 5.6
      env: dependencies=lowest
    - php: 7
      env: dependencies=lowest
    - php: hhvm
      env: dependencies=lowest
  fast_finish: true

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

before_install:
  - composer self-update -q
  - if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;

install:
  - if [ -z "$dependencies" ]; then travis_retry composer install --no-interaction; fi;
  - if [ "$dependencies" = "lowest" ]; then travis_retry composer update --prefer-lowest --no-interaction; fi;
  - composer show -i

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

after_script:
  - travis_retry composer require satooshi/php-coveralls:dev-master --no-interaction --update-with-dependencies
  - if [ -f ./build/logs/clover.xml ]; then php vendor/bin/coveralls -v; fi

language: php

php:
  - 5.3
  - 5.4
  - 5.5
  - 5.6
  - 7
  - hhvm

matrix:
  include:
    - php: 5.3
      env: dependencies=lowest
    - php: 5.4
      env: dependencies=lowest
    - php: 5.5
      env: dependencies=lowest
    - php: 5.6
      env: dependencies=lowest
    - php: 7
      env: dependencies=lowest
    - php: hhvm
      env: dependencies=lowest
  fast_finish: true

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

before_install:
  - composer self-update -q
  - if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;

install:
  - if [ -z "$dependencies" ]; then travis_retry composer install --no-interaction; fi;
  - if [ "$dependencies" = "lowest" ]; then travis_retry composer update --prefer-lowest --no-interaction; fi;
  - composer show -i

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

after_script:
  - if [ -f ./build/logs/clover.xml ]; then travis_retry composer require satooshi/php-coveralls:dev-master --no-interaction --update-with-dependencies; fi
  - if [ -f ./build/logs/clover.xml ]; then php vendor/bin/coveralls -v; fi

Install php-coveralls only if coverage file available
Install php-coveralls only if coverage file available
