language: php

php:
  - 7.0
  - 7.1

sudo: false

services:
  - mysql

env:
  global:
    - ARTISAN_DB_HOST=127.0.0.1
    - ARTISAN_DB_PORT=3306
    - ARTISAN_DB_USER=travis
    - ARTISAN_DB_PASS=""
  matrix:
    - PHPUNIT_VERSION="^5.7"
    - PHPUNIT_VERSION="^6.0"

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

before_install:
  - phpenv config-rm xdebug.ini
  - travis_retry composer self-update
  - mysql -e 'CREATE DATABASE IF NOT EXISTS suitey_test_default;'
  - mysql -e 'CREATE DATABASE IF NOT EXISTS suitey_test_foo;'
  - mysql -e 'CREATE DATABASE IF NOT EXISTS suitey_test_bar;'

install:
  - composer install --no-interaction --prefer-dist --no-suggest
  - composer require phpunit/phpunit:${PHPUNIT_VERSION} --dev --update-with-dependencies --no-interaction --prefer-dist --no-suggest

script: vendor/bin/phpunit

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

language: php

php:
  - 7.0
  - 7.1
  - 7.2

sudo: false

services:
  - mysql

env:
  global:
    - ARTISAN_DB_HOST=127.0.0.1
    - ARTISAN_DB_PORT=3306
    - ARTISAN_DB_USER=travis
    - ARTISAN_DB_PASS=""
  matrix:
    - PHPUNIT_VERSION="^5.7"
    - PHPUNIT_VERSION="^6.0"

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

before_install:
  - phpenv config-rm xdebug.ini
  - travis_retry composer self-update
  - mysql -e 'CREATE DATABASE IF NOT EXISTS suitey_test_default;'
  - mysql -e 'CREATE DATABASE IF NOT EXISTS suitey_test_foo;'
  - mysql -e 'CREATE DATABASE IF NOT EXISTS suitey_test_bar;'

install:
  - composer install --no-interaction --prefer-dist --no-suggest
  - composer require phpunit/phpunit:${PHPUNIT_VERSION} --dev --update-with-dependencies --no-interaction --prefer-dist --no-suggest

script: vendor/bin/phpunit

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

Add PHP 7.2 to Travis
Add PHP 7.2 to Travis
