language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - 7.1
  - 7.2

before_script:
  - 'composer install --dev --prefer-source'

script: php test/test.php

after_script:
  - if [ $(phpenv version-name) = "7.2" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  - if [ $(phpenv version-name) = "7.2" ]; then php ocular.phar code-coverage:upload --format=php-clover test/build/clover.xml; fi
