language: php

sudo: false

matrix:
  include:
    - php: 7.0
      env: WITH_COVERAGE=true
    - php: 5.6
      env: WITH_CS=true
    - php: 5.5

env:
  global:
    - TRAVIS_DB=cfp_travis
    - CODECLIMATE_REPO_TOKEN=9deb249b01a414d979959cfd05a4c351b19a5959858653b20276454d4189edc3

# cache composer downloads so installing is quicker
cache:
  directories:
    - $HOME/.composer/cache

before_install:
  - composer self-update
  - composer validate --no-check-publish

install:
  - composer install

before_script:
  - sh tools/travis/setup-mail.sh
  - mysql -e "CREATE DATABASE $TRAVIS_DB" -uroot
  - vendor/bin/phinx --configuration=phinx.yml.dist migrate -e testing

script:
  - if [[ "$WITH_COVERAGE" == "true" ]]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; else vendor/bin/phpunit; fi
  - if [[ "$WITH_CS" == "true" ]]; then vendor/bin/php-cs-fixer fix --verbose; fi

after_success:
  - if [[ "$WITH_COVERAGE" == "true" ]]; then vendor/bin/test-reporter --coverage-report build/logs/clover.xml; fi

language: php

sudo: false

matrix:
  fast_finish: true
  include:
    - php: 7.0
      env: WITH_COVERAGE=true
    - php: 5.6
      env: WITH_CS=true
    - php: 5.5

env:
  global:
    - TRAVIS_DB=cfp_travis
    - CODECLIMATE_REPO_TOKEN=9deb249b01a414d979959cfd05a4c351b19a5959858653b20276454d4189edc3

# cache composer downloads so installing is quicker
cache:
  directories:
    - $HOME/.composer/cache

before_install:
  - composer self-update
  - composer validate --no-check-publish

install:
  - composer install

before_script:
  - sh tools/travis/setup-mail.sh
  - mysql -e "CREATE DATABASE $TRAVIS_DB" -uroot
  - vendor/bin/phinx --configuration=phinx.yml.dist migrate -e testing

script:
  - if [[ "$WITH_COVERAGE" == "true" ]]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; else vendor/bin/phpunit; fi
  - if [[ "$WITH_CS" == "true" ]]; then vendor/bin/php-cs-fixer fix --verbose; fi

after_success:
  - if [[ "$WITH_COVERAGE" == "true" ]]; then vendor/bin/test-reporter --coverage-report build/logs/clover.xml; fi

Allow builds to finish early
Fix: Allow builds to finish early
