language: php

sudo: true

php:
  - 7.0
  - 7.1
  - 7.2
  - nightly

env:
  matrix:
    - COMPOSER_FLAGS="--prefer-lowest"
    - COMPOSER_FLAGS=""

matrix:
  fast_finish: true

  allow_failures:
    - php: nightly

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

services:
  - sqlite

before_script:
  - composer install
  - travis_retry composer self-update
  - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist
  - composer show laravel/framework
  - npm install
  - npm run dev

script:
  - vendor/bin/phpunit
  
addons:
 code_climate

after_success:
  - vendor/bin/test-reporter
