sudo: required

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

git:
  depth: 1

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

install:
  - composer install --prefer-dist

before_script:
  - for P in src tests; do find $P -type f -name '*.php' -exec php -l {} \;; done

script:
  - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml

after_success:
    - bash <(curl -s https://codecov.io/bash)
