language: php

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

matrix:
  allow_failures:
    - php: 7.0
    - php: hhvm
  include:
    - php: 5.4
      env:
        - COMPOSER_FLAGS="--prefer-lowest --prefer-stable"
        - COVERAGE=true

install:
  - if [[ "$TRAVIS_PHP_VERSION" == "hhvm" ]]; then composer require mongofill/mongofill=dev-master --no-update; fi
  - travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction

script:
  - vendor/bin/phpunit
  - vendor/bin/phpspec run

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

language: php

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

matrix:
  allow_failures:
    - php: 7.0
    - php: hhvm
  include:
    - php: 5.4
      env:
        - COMPOSER_FLAGS="--prefer-lowest --prefer-stable"
        - COVERAGE=true
        - PHPUNIT_FLAGS="--coverage-clover=coverage.clover"

install:
  - if [[ "$TRAVIS_PHP_VERSION" == "hhvm" ]]; then composer require mongofill/mongofill=dev-master --no-update; fi
  - travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction

script:
  - vendor/bin/phpunit ${PHPUNIT_FLAGS}
  - vendor/bin/phpspec run

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

Enable code coverage on Travis
Enable code coverage on Travis
