language: php
# list any PHP version you want to test against
php:
# 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
install:
- sudo apt-get install -y --force-yes nginx php-fpm php5-mysql
- cp .travis_nginx.conf /etc/nginx/nginx.conf
- /etc/init.d/nginx restart
# 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
# shimmie needs to be able to create directories for images, etc.
# (permissions of 777 are bad, but it definitely works)
- chmod -R 777 .
script: php tests/test_install.php -d $DB
# configure notifications (email, IRC, campfire etc)
#notifications:
# irc: "irc.freenode.org#travis"
#