os:
  - linux

language:
  - php

php:
  - 5.6
  - 7.0
  - 7.1

sudo: required

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

services:
  - mysql

before_script:
  - cp .env.travis .env
  - mysql -u root -e 'create database travis_ci;'
  - composer self-update
  - composer install --dev --prefer-source --no-interaction
  - php artisan key:generate
  - composer dump-autoload
  - sudo chgrp -R www-data storage bootstrap/cache
  - sudo chmod -R ug+rwx storage bootstrap/cache
  - php artisan config:cache
  - nvm install 6.10.3
  - npm install npm@latest -g
  - npm install -g yarn
  - yarn
  - npm run development

script:
  - vendor/bin/phpunit

os:
  - linux

language:
  - php

php:
  - 5.6
  - 7.0
  - 7.1

sudo: required

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

services:
  - mysql

before_script:
  - cp .env.travis .env
  - mysql -u root -e 'create database travis_ci;'
  - composer self-update
  - composer install --dev --prefer-source --no-interaction
  - php artisan key:generate
  - composer dump-autoload
  - sudo chgrp -R www-data storage bootstrap/cache
  - sudo chmod -R ug+rwx storage bootstrap/cache
  - php artisan config:cache
  - nvm install 6.10.3
  - npm install npm@latest -g
  - npm install -g yarn
  - yarn
  - npm run development

script:
  - vendor/bin/phpunit --coverage-clover=coverage.xml

after_success:
  - bash <(curl -s https://codecov.io/bash)

Add CodeCov to Travis build.
TravisCI: Add CodeCov to Travis build.

