language: php
php:
  - 5.3
  - 5.4
  - 5.5

# 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" == "pgsql" ]]; then psql -c "DROP DATABASE IF EXISTS hello_world_test;" -U postgres; fi
#  - if [[ "$DB" == "pgsql" ]]; then psql -c "create database hello_world_test;" -U postgres; fi
  - if [[ "$DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS microweber_tests;" -uroot; fi

# omitting "script:" will default to phpunit
# use the $DB env variable to determine the phpunit.xml to use
script: phpunit -v --configuration src/Microweber/tests/phpunit.travis.xml

# configure notifications (email, IRC, campfire etc)
notifications:
  irc: "irc.freenode.org#microweber"

branches:
  only:
    - master
    - dev