language: php

php:
  - 5.6
  - 7.0

install:
  - travis_retry npm install -g npm@2
  - travis_retry npm install
  - travis_retry composer self-update
  - travis_retry composer install --no-interaction

before_script:
  - cp .env.travis .env
  - php artisan key:generate
  - npm run dev

script:
  - ./vendor/bin/phpunit

language: php

php:
  - 5.6
  - 7.1

install:
  - travis_retry npm install -g npm@2
  - travis_retry npm install
  - travis_retry composer self-update
  - travis_retry composer install --no-interaction

before_script:
  - cp .env.travis .env
  - php artisan key:generate
  - npm run dev
  - php artisan testing:rebuild

script:
  - ./vendor/bin/phpunit

Rebuild testing database before running phpunit
Travis: Rebuild testing database before running phpunit
