language: php

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

php:
  - 7.0
  - 7.1
  - nightly

matrix:
  allow_failures:
    - php: nightly
  include:
    - php: 7.0
      env: 'COMPOSER_FLAGS="--prefer-stable --prefer-lowest"'

before_script:
  - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source

script:
  - composer test

after_script:
  - bash -c '[[ -f "build/logs/clover.xml" ]] && wget https://scrutinizer-ci.com/ocular.phar'
  - bash -c '[[ -f "build/logs/clover.xml" ]] && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml'

language: php

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

php:
  - 7.0
  - 7.1
  - 7.2
  - nightly

matrix:
  allow_failures:
    - php: nightly
  include:
    - php: 7.0
      env: 'COMPOSER_FLAGS="--prefer-stable --prefer-lowest"'

before_script:
  - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source

script:
  - composer test

after_script:
  - bash -c '[[ -f "build/logs/clover.xml" ]] && wget https://scrutinizer-ci.com/ocular.phar'
  - bash -c '[[ -f "build/logs/clover.xml" ]] && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml'

Add testing on PHP 7.2
Add testing on PHP 7.2
