2014-02-10 00:33:57 -05:00
|
|
|
language: php
|
2014-02-19 00:40:16 -05:00
|
|
|
|
2014-02-10 00:33:57 -05:00
|
|
|
php:
|
2014-02-19 00:40:16 -05:00
|
|
|
# Here is where we can list the versions of PHP you want to test against
|
2014-02-10 00:33:57 -05:00
|
|
|
# using major version aliases
|
|
|
|
- 5.3
|
2014-02-23 03:07:19 -05:00
|
|
|
- 5.4
|
|
|
|
- 5.5
|
2014-02-10 00:33:57 -05:00
|
|
|
|
|
|
|
# optionally specify a list of environments, for example to test different RDBMS
|
|
|
|
env:
|
|
|
|
- DB=mysql
|
2014-02-22 15:51:17 -05:00
|
|
|
- DB=pgsql
|
2014-02-17 16:57:46 -05:00
|
|
|
|
|
|
|
before_install:
|
|
|
|
- sudo apt-get update > /dev/null
|
2014-02-17 22:56:32 -05:00
|
|
|
- sudo chmod u+x tests/setup_test_env.sh
|
2014-02-18 23:18:59 -05:00
|
|
|
|
|
|
|
install:
|
2014-02-19 00:40:16 -05:00
|
|
|
# Install nginx, php5-fpm and configure them
|
2014-02-17 22:56:32 -05:00
|
|
|
- sudo ./tests/setup_test_env.sh $TRAVIS_BUILD_DIR
|
2014-02-22 15:36:52 -05:00
|
|
|
|
2014-02-22 16:32:14 -05:00
|
|
|
# Enable logging of all queries (for debugging) and create the database schema for shimmie.
|
|
|
|
- if [[ "$DB" == "pgsql" ]]; then psql -c "SELECT set_config('log_statement', 'all', false);" -U postgres; fi
|
2014-02-22 16:42:12 -05:00
|
|
|
- if [[ "$DB" == "pgsql" ]]; then psql -c "CREATE DATABASE shimmie;" -U postgres; fi
|
2014-02-21 14:26:44 -05:00
|
|
|
- if [[ "$DB" == "mysql" ]]; then mysql -e "SET GLOBAL general_log = 'ON';" -uroot; fi
|
2014-02-19 00:40:16 -05:00
|
|
|
- if [[ "$DB" == "mysql" ]]; then mysql -e "CREATE DATABASE shimmie;" -uroot; fi
|
2014-02-18 23:02:10 -05:00
|
|
|
|
2014-02-18 23:18:59 -05:00
|
|
|
script:
|
2014-02-19 03:29:12 -05:00
|
|
|
- php tests/test_install.php -d $DB -h "http://127.0.0.1/"
|
2014-02-19 18:36:38 -05:00
|
|
|
- php tests/test_all.php -h "http://127.0.0.1/"
|
2014-02-10 00:33:57 -05:00
|
|
|
|
2014-02-18 03:42:59 -05:00
|
|
|
# If a failure occured then dump out a bunch of logs for debugging purposes.
|
2014-02-18 01:02:11 -05:00
|
|
|
after_failure:
|
2014-02-19 16:16:01 -05:00
|
|
|
- sudo ls -al
|
2014-02-18 22:21:14 -05:00
|
|
|
- sudo ls -al data/config/
|
2014-02-18 20:08:23 -05:00
|
|
|
- sudo cat data/config/shimmie.conf.php
|
|
|
|
- sudo cat data/config/extensions.conf.php
|
2014-02-21 20:04:12 -05:00
|
|
|
- sudo cat /etc/nginx/sites-enabled/default
|
|
|
|
- sudo cat /var/log/nginx/error.log
|
2014-02-19 16:24:47 -05:00
|
|
|
- sudo cat /var/log/php5-fpm.log
|
2014-02-21 20:36:19 -05:00
|
|
|
- sudo ls /var/run/mysql*
|
|
|
|
- sudo ls /var/log/*mysql*
|
2014-02-21 20:49:17 -05:00
|
|
|
- sudo cat /var/log/mysql.err
|
|
|
|
- sudo cat /var/log/mysql.log
|
|
|
|
- sudo cat /var/log/mysql/error.log
|
|
|
|
- sudo cat /var/log/mysql/slow.log
|
2014-02-22 16:04:04 -05:00
|
|
|
- sudo ls /var/log/postgresql
|
|
|
|
- sudo cat /var/log/postgresql/postgresql*
|
2014-02-18 01:02:11 -05:00
|
|
|
|
2014-02-10 00:33:57 -05:00
|
|
|
# configure notifications (email, IRC, campfire etc)
|
|
|
|
#notifications:
|
2014-02-19 16:16:01 -05:00
|
|
|
# irc: "irc.freenode.org#shimmie"
|
2014-02-10 00:33:57 -05:00
|
|
|
#
|