Skip to content

Instantly share code, notes, and snippets.

@yuya-takeyama
Created December 19, 2011 17:33
Show Gist options
  • Save yuya-takeyama/1498081 to your computer and use it in GitHub Desktop.
Save yuya-takeyama/1498081 to your computer and use it in GitHub Desktop.
Travis CI PHP
language: php
php:
- 5.3
- 5.4
language: php
php:
- 5.3
- 5.4
before_install: sh install-vendor.sh
language: php
php:
- 5.3
- 5.4
env:
- TESTING_FRAMEWORK=PHPUnit
- TESTING_FRAMEWORK=Behat
before_install: sh install-vendor.sh
script: sh run-test.sh
#!/bin/sh
if [ ! -d ./vendor ]; then
mkdir vendor
fi
if [ ! -f pyrus.phar ]; then
wget http://pear2.php.net/pyrus.phar
fi
php pyrus.phar ./vendor di pear.phpspec.net
php pyrus.phar ./vendor di pear.phpunit.de
php pyrus.phar ./vendor set bin_dir ./vendor/bin
php pyrus.phar ./vendor install phpspec/PHPSpec-1.2.2beta
#!/bin/sh
if [ "$TESTING_FRAMEWORK" = "PHPUnit" ]; then
phpunit
elif [ "$TESTING_FRAMEWORK" = "Behat" ]; then
if [ ! -f behat.phar ]; then
wget https://github.com/downloads/Behat/Behat/behat.phar
fi
php behat.phar
fi
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment