# Use Docker environment
sudo: false

# Setup build matrix
language: php
php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - 7.1
  - 7.2

matrix:
  include:
    - php: 5.3
      dist: precise

# Dependencies
before_install:
  - composer self-update

install:
  - travis_retry composer update --no-interaction --prefer-source

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

# Cache dependencies
cache:
  directories:
    - vendor
    - $HOME/.composer/cache
