#dist: trusty
language: php
php:
  - '7.0'
  - '7.1'
#  - hhvm

services:
  - mysql

before_install:
   - mysql -e 'CREATE DATABASE IF NOT EXISTS phpvms;'

before_script:
  - cp .env.travis .env
  - composer self-update
  - composer install --no-interaction

script:
  - php artisan database:create --reset
  - php artisan migrate:refresh --seed
  - cp phpunit.travis.xml phpunit.xml
  - vendor/bin/phpunit --debug --verbose

after_success:
- | # Add binary to GitHub release.
  if test "$TRAVIS_TAG"
  then
    echo "Branch name is $TRAVIS_TAG"
  else
    echo "no branch name"
  fi
