2014-02-10 05:33:57 +00:00
|
|
|
language: php
|
2014-02-18 02:26:06 +00:00
|
|
|
# list the versions of PHP you want to test against
|
2014-02-10 05:33:57 +00: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 21:57:46 +00:00
|
|
|
# - DB=pgsql
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
- sudo apt-get update > /dev/null
|
|
|
|
|
|
|
|
install:
|
2014-02-18 03:56:32 +00:00
|
|
|
- sudo chmod u+x tests/setup_test_env.sh
|
|
|
|
- sudo ./tests/setup_test_env.sh $TRAVIS_BUILD_DIR
|
2014-02-10 05:33:57 +00: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-18 22:18:25 +00:00
|
|
|
script: php tests/all_tests.php -d $DB
|
2014-02-10 05:33:57 +00:00
|
|
|
|
2014-02-18 08:42:59 +00:00
|
|
|
# If a failure occured then dump out a bunch of logs for debugging purposes.
|
2014-02-18 06:02:11 +00:00
|
|
|
after_failure:
|
|
|
|
- sudo cat /etc/nginx/sites-enabled/default
|
|
|
|
- sudo cat /var/log/nginx/error.log
|
2014-02-19 03:21:14 +00:00
|
|
|
- sudo ls -al
|
|
|
|
- sudo ls -al data/config/
|
2014-02-19 01:08:23 +00:00
|
|
|
- sudo cat data/config/shimmie.conf.php
|
|
|
|
- sudo cat data/config/extensions.conf.php
|
2014-02-18 17:22:52 +00:00
|
|
|
- sudo cat /var/log/php5-fpm.log
|
2014-02-18 17:57:32 +00:00
|
|
|
- sudo cat /var/log/mysql.log
|
|
|
|
- sudo cat /var/log/mysql.err
|
2014-02-18 06:02:11 +00:00
|
|
|
|
2014-02-10 05:33:57 +00:00
|
|
|
# configure notifications (email, IRC, campfire etc)
|
|
|
|
#notifications:
|
|
|
|
# irc: "irc.freenode.org#travis"
|
|
|
|
#
|