addons:
  hosts:
    - AlisonMBP

# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
language: php

# list any PHP version you want to test against
php:
  - 5.4
  - 5.5
  - 5.6

# optionally specify a list of environments, for example to test different RDBMS
env:
  - DB=mysql

# execute any number of scripts before the test run, custom env's are available as variables
before_script:
  - if [[ "$DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS snipeit_laravel;" -utravis; fi
  - curl -s http://getcomposer.org/installer | php
  - cp app/config/testing/app.example.php app/config/testing/app.php
  - cp app/config/testing/database.example.php app/config/testing/database.php
  - cp app/config/testing/mail.example.php app/config/testing/mail.php
  - composer self-update
  - composer install --prefer-source --no-interaction
  - php artisan key:generate --env=testing
  - php artisan migrate:install --env=testing --no-interaction -vvv
  - php artisan migrate --package cartalyst/sentry --env=testing --no-interaction -vvv
  - php artisan migrate --env=testing --no-interaction -vvv
  - php artisan db:seed --env=testing --no-interaction -vvv

# omitting "script:" will default to phpunit
# use the $DB env variable to determine the phpunit.xml to use
script: phpunit

# configure notifications (email, IRC, campfire etc)
notifications:
  slack:
    secure: vv9we1RxB9RsrMbomSdq6D7vz/okobw87pEkgIZjB+hj1QpQ2by90gsPsOa+NgsJEFaEP7e4KlT6SH8kK+zhbmuKaUd3d1//XdcancE22LZXi6tkiB5yuR/Jhhb1LLDqyGJTB4D92hMnnCPiUjpxNA3r437ttNeYRdYIEEP3drA=
