language: php php: # Here is where we can list the versions of PHP you want to test against # using major version aliases - 5.3 # optionally specify a list of environments, for example to test different RDBMS env: - DB=mysql # - DB=pgsql before_install: - sudo apt-get update > /dev/null - sudo chmod u+x tests/setup_test_env.sh install: # Install nginx, php5-fpm and configure them - sudo ./tests/setup_test_env.sh $TRAVIS_BUILD_DIR # Create the database schema for shimmie. - 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 "SET GLOBAL general_log = 'ON';" -uroot; fi - if [[ "$DB" == "mysql" ]]; then mysql -e "CREATE DATABASE shimmie;" -uroot; fi script: - php tests/test_install.php -d $DB -h "http://127.0.0.1/" - php tests/test_all.php -h "http://127.0.0.1/" # If a failure occured then dump out a bunch of logs for debugging purposes. after_failure: - sudo cat /etc/nginx/sites-enabled/default - sudo cat /var/log/nginx/error.log - sudo ls -al - sudo ls -al data/config/ - sudo cat data/config/shimmie.conf.php - sudo cat data/config/extensions.conf.php - sudo cat /var/log/php5-fpm.log - sudo cat -f /var/log/mysql/mysql.log # configure notifications (email, IRC, campfire etc) #notifications: # irc: "irc.freenode.org#shimmie" #