language: php
dist: trusty

php: 
  - 7.0
  - 7.1
  - 7.2

branches:
  only:
    - master

before_script:
  - pear install PHP_CodeSniffer
  - phpenv rehash
  - composer install

script: phpunit --coverage-clover=coverage.clover

after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
