language: php
sudo: false

php:
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - nightly

env:
  global:
    - DEFAULT=1

matrix:
  allow_failures:
    - php: nightly

  fast_finish: true

  include:
    - php: 7.1
      env:
        - COVERALLS=1

before_script:
  - composer self-update
  - rm composer.lock
  - composer install --prefer-dist --no-interaction
  - sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev 'satooshi/php-coveralls:^2.0'; fi"
  - sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"

script:
- sh -c "if [ '$COVERALLS' = '1' ]; then vendor/bin/phpunit --stderr --coverage-clover build/logs/clover.xml; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then php vendor/bin/php-coveralls -v; fi"
- sh -c "if [ '$DEFAULT' = '1' ]; then vendor/bin/phpunit --stderr; fi"

notifications:
  email: false

language: php
sudo: false

php:
  - 7.0
  - 7.1
  - 7.2
  - nightly

env:
  global:
    - DEFAULT=1

matrix:
  allow_failures:
    - php: nightly

  fast_finish: true

  include:
    - php: 7.1
      env:
        - COVERALLS=1

before_script:
  - composer self-update
  - rm composer.lock
  - composer install --prefer-dist --no-interaction
  - sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev 'satooshi/php-coveralls:^2.0'; fi"
  - sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"

script:
- sh -c "if [ '$COVERALLS' = '1' ]; then vendor/bin/phpunit --stderr --coverage-clover build/logs/clover.xml; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then php vendor/bin/php-coveralls -v; fi"
- sh -c "if [ '$DEFAULT' = '1' ]; then vendor/bin/phpunit --stderr; fi"

notifications:
  email: false

Stop testing on PHP 5.6 as we bumped the minimum version to 7.0.0
Stop testing on PHP 5.6 as we bumped the minimum version to 7.0.0
