language: php

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

before_script:
  - composer install --prefer-source

script:
  - phpunit

after_success:
  - if [[ "`phpenv version-name`" != "7.0" ]]; then exit 0; fi
  - vendor/bin/phpunit --coverage-clover coverage.clover
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover

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