2014-02-10 00:33:57 -05:00
|
|
|
language: php
|
2014-02-17 21:26:06 -05:00
|
|
|
# list the versions of PHP you want to test against
|
2014-02-10 00:33:57 -05:00
|
|
|
php:
|
|
|
|
# using major version aliases
|
|
|
|
- 5.3
|
|
|
|
|
|
|
|
# optionally specify a list of environments, for example to test different RDBMS
|
|
|
|
env:
|
|
|
|
- DB=mysql
|
2014-02-17 16:57:46 -05:00
|
|
|
# - DB=pgsql
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
- sudo apt-get update > /dev/null
|
|
|
|
|
|
|
|
install:
|
2014-02-17 22:56:32 -05:00
|
|
|
- sudo chmod u+x tests/setup_test_env.sh
|
|
|
|
- sudo ./tests/setup_test_env.sh $TRAVIS_BUILD_DIR
|
2014-02-10 00:33:57 -05:00
|
|
|
|
|
|
|
# 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 shimmie;" -U postgres; fi
|
|
|
|
- if [[ "$DB" == "pgsql" ]]; then psql -c "create database shimmie;" -U postgres; fi
|
|
|
|
- if [[ "$DB" == "mysql" ]]; then mysql -e "create database shimmie;" -uroot; fi
|
|
|
|
|
2014-02-17 15:00:04 -05:00
|
|
|
script: php tests/test_install.php -d $DB
|
2014-02-10 00:33:57 -05:00
|
|
|
|
|
|
|
# configure notifications (email, IRC, campfire etc)
|
|
|
|
#notifications:
|
|
|
|
# irc: "irc.freenode.org#travis"
|
|
|
|
#
|