language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - hhvm

before_install:
  - mkdir tests/files
  - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then rm phpunit.xml; fi;'
  - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then mv phpunit.hhvm.xml phpunit.xml; fi;'

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

script:
  - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then bin/phpunit; fi;'
  - bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then bin/phpunit --coverage-text --coverage-clover coverage.xml; fi;'
  - bin/phpspec run

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

language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - hhvm

before_install:
  - mkdir tests/files
  - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then rm phpunit.xml; fi;'
  - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then mv phpunit.hhvm.xml phpunit.xml; fi;'

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

script:
  - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then bin/phpunit; fi;'
  - bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then bin/phpunit --coverage-text --coverage-clover coverage.xml; fi;'
  - bin/phpspec run

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

Send the coverage data when it's NOT hhvm.
Send the coverage data when it's NOT hhvm.
