# See https://github.com/silverstripe-labs/silverstripe-travis-support for setup details

language: php 

php:
 - 5.4

env:
  global:
    - CORE_RELEASE=3
  matrix:
    - DB=MYSQL
    - DB=PGSQL

matrix:
  include:
    - php: 5.3
      env: DB=MYSQL
    - php: 5.4
      env: DB=MYSQL BEHAT_TEST=1

before_script:
 - composer self-update
 - phpenv rehash
 - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
 - "if [ \"$BEHAT_TEST\" = \"\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss; fi"
 - "if [ \"$BEHAT_TEST\" = \"1\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require silverstripe/behat-extension; fi"
 - cd ~/builds/ss
 - php ~/travis-support/travis_setup_selenium.php --if-env BEHAT_TEST
 - php ~/travis-support/travis_setup_php54_webserver.php --if-env BEHAT_TEST

script: 
 - "if [ \"$BEHAT_TEST\" = \"\" ]; then vendor/bin/phpunit subsites/tests; fi"
 - "if [ \"$BEHAT_TEST\" = \"1\" ]; then vendor/bin/behat @subsites; fi"

# See https://github.com/silverstripe-labs/silverstripe-travis-support for setup details

language: php 

php:
 - 5.4

env:
 - DB=MYSQL CORE_RELEASE=3.2

matrix:
  include:
    - php: 5.3
      env: DB=PGSQL CORE_RELEASE=3.2
    - php: 5.6
      env: DB=MYSQL CORE_RELEASE=3
    - php: 5.4
      env: DB=MYSQL CORE_RELEASE=3.2 BEHAT_TEST=1

before_script:
 - composer self-update
 - phpenv rehash
 - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
 - "if [ \"$BEHAT_TEST\" = \"\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss; fi"
 - "if [ \"$BEHAT_TEST\" = \"1\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require silverstripe/behat-extension; fi"
 - cd ~/builds/ss
 - php ~/travis-support/travis_setup_selenium.php --if-env BEHAT_TEST
 - php ~/travis-support/travis_setup_php54_webserver.php --if-env BEHAT_TEST

script: 
 - "if [ \"$BEHAT_TEST\" = \"\" ]; then vendor/bin/phpunit subsites/tests; fi"
 - "if [ \"$BEHAT_TEST\" = \"1\" ]; then vendor/bin/behat @subsites; fi"

Test 3 / 3.2 branches and php 5.6
Test 3 / 3.2 branches and php 5.6
