language: php
sudo: false

php:
  - 7.0
  - 7.1
  - 7.2
  - 7.3
  - 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
  - 7.3
  - nightly

env:
  global:
    - DEFAULT=1

matrix:
  allow_failures:
    - php: 7.3
    - 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

Allow failures in Travis with PHP 7.3
Allow failures in Travis with PHP 7.3

Because our dependency Gaufrette contains a PHP 7.3 incompatibility:

There was 1 error:
1) Burzum\FileStorage\Test\TestCase\Model\Behavior\FileStorageBehaviorTest::testAfterDelete
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
/home/travis/build/burzum/cakephp-file-storage/vendor/knplabs/gaufrette/src/Gaufrette/Util/Path.php:30
/home/travis/build/burzum/cakephp-file-storage/vendor/knplabs/gaufrette/src/Gaufrette/Adapter/Local.php:37
/home/travis/build/burzum/cakephp-file-storage/src/Storage/StorageManager.php:171
/home/travis/build/burzum/cakephp-file-storage/src/Storage/StorageManager.php:148
/home/travis/build/burzum/cakephp-file-storage/src/Storage/StorageManager.php:126
/home/travis/build/burzum/cakephp-file-storage/src/Storage/StorageTrait.php:44
/home/travis/build/burzum/cakephp-file-storage/src/Model/Behavior/FileStorageBehavior.php:161
/home/travis/build/burzum/cakephp-file-storage/tests/TestCase/Model/Behavior/FileStorageBehaviorTest.php:107
