2013-11-28 11:06:31 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2013-11-30 18:11:20 +02:00
|
|
|
if [[ -z $SAUCE_ACCESS_KEY ]]
|
2013-11-30 17:56:37 +02:00
|
|
|
then
|
|
|
|
echo "No Sauce Api Key (Pull request)"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2013-11-28 12:11:07 +02:00
|
|
|
PHP_VERSION=`php -v|grep --only-matching --perl-regexp "PHP 5\.\\d+"`
|
2013-11-28 11:41:14 +02:00
|
|
|
echo $PHP_VERSION
|
|
|
|
|
2013-11-28 11:06:31 +02:00
|
|
|
|
2013-11-28 21:49:52 +02:00
|
|
|
if [[ $PHP_VERSION != "PHP 5.4" ]]
|
2013-11-28 11:06:31 +02:00
|
|
|
then
|
|
|
|
echo "Bad PHP version"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Good PHP version"
|
|
|
|
|
2013-12-04 19:29:41 +02:00
|
|
|
# Install dependencies
|
2013-12-04 19:16:47 +02:00
|
|
|
wget http://getcomposer.org/composer.phar
|
|
|
|
php composer.phar install
|
|
|
|
|
|
|
|
# Handle coveralls
|
|
|
|
mkdir -p build/logs
|
|
|
|
cp -v clover.xml build/logs/clover.xml
|
2013-12-04 19:29:41 +02:00
|
|
|
echo "src_dir: ." > .coveralls.yml
|
2013-12-04 20:15:35 +02:00
|
|
|
php vendor/bin/coveralls -v --exclude-no-stmt
|
2013-12-04 19:16:47 +02:00
|
|
|
|
|
|
|
# Handle Sauce
|
2013-12-04 19:29:41 +02:00
|
|
|
curl https://gist.github.com/seblucas/7692094/raw/e2a090e6ea639a0d700e6d02cee048fa2f6c8617/sauce_connect_setup.sh | bash
|
2013-11-28 17:21:40 +02:00
|
|
|
cp -v test/config_local.php.sauce config_local.php
|
2013-11-28 16:27:50 +02:00
|
|
|
php -S 127.0.0.1:8888 &
|
2013-11-29 17:05:19 +02:00
|
|
|
vendor/bin/phpunit --no-configuration test/Sauce.php
|
|
|
|
|
2013-11-29 10:44:51 +02:00
|
|
|
|