Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (62 sloc) 2.66 KB
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
language: php
# list any PHP version you want to test against
php:
# using major version aliases
# aliased to 5.2.17
#- 5.2
# aliased to 5.3.29
- 5.3
# aliased to a recent 5.4.x version
- 5.4
# aliased to a recent 5.5.x version
- 5.5
# aliased to a recent 5.6.x version
- 5.6
# aliased to a recent 7.x version
#- 7.0
- hhvm
- nightly
matrix:
fast_finish: true
allow_failures:
#- php: 5.2
#- php: 5.6
- php: 7.0
- php: hhvm
- php: nightly
# optionally specify a list of environments, for example to test different RDBMS
env:
- DB=mysql
# - DB=pgsql
sudo: required
before_install:
# Using PHPUnit 4,8
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.5" ]]; then curl -s -o $HOME/.phpenv/versions/5.5/bin/phpunit https://phar.phpunit.de/phpunit-4.8.9.phar; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.5" ]]; then chmod +x $HOME/.phpenv/versions/5.5/bin/phpunit; fi
#- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.5" ]]; then chmod +x $HOME/.phpenv/versions/5.5/bin/phpunit
# execute any number of scripts before the test run, custom env's are available as variables
before_script:
# - sudo apt-get update
# - sudo apt-get install apache2 libapache2-mod-fastcgi
# enable php-fpm
# - sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
# - sudo a2enmod rewrite actions fastcgi alias
# - echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# - ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
# - sudo cp -f etc/travis-ci/travis-ci-apache /etc/apache2/sites-available/default
# - sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
# - sudo service apache2 restart
# - if [[ "$DB" == "pgsql" ]]; then psql -c "DROP DATABASE IF EXISTS hello_world_test;" -U postgres; fi
# - if [[ "$DB" == "pgsql" ]]; then psql -c "create database hello_world_test;" -U postgres; fi
- if [[ "$DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS miana;" -uroot; fi
- if [[ "$DB" == "mysql" ]]; then mysql -u root miana < files/pharinix.sql; fi
# omitting "script:" will default to phpunit
# use the $DB env variable to determine the phpunit.xml to use
script:
- phpunit --configuration etc/travis-ci/phpunit.xml.dist
#- phpunit --configuration etc/travis-ci/phpunit.xml.dist --coverage-text
# configure notifications (email, IRC, campfire etc)
notifications:
email: "aaaaa976@gmail.com"