Reorder the script so that code coverage is run even for PR.

--HG--
extra : rebase_source : f8b07b7ebee8fb39978bd54d3a3ef5c30c4e5051
This commit is contained in:
Sébastien Lucas 2014-03-03 14:06:19 +01:00
parent 7a49600d4a
commit c200a54466

View file

@ -1,11 +1,5 @@
#!/usr/bin/env bash
if [[ -z $SAUCE_ACCESS_KEY ]]
then
echo "No Sauce Api Key (Pull request)"
exit
fi
PHP_VERSION=`php -v|grep --only-matching --perl-regexp "PHP 5\.\\d+"`
echo $PHP_VERSION
@ -18,14 +12,20 @@ fi
echo "Good PHP version"
# Install dependencies
wget http://getcomposer.org/composer.phar
php composer.phar install
# Handle scrutinizer
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover clover.xml
if [[ -z $SAUCE_ACCESS_KEY ]]
then
echo "No Sauce Api Key (Pull request)"
exit
fi
# Install dependencies
wget http://getcomposer.org/composer.phar
php composer.phar install
# Handle Sauce
curl https://gist.githubusercontent.com/seblucas/7692094/raw/e2a090e6ea639a0d700e6d02cee048fa2f6c8617/sauce_connect_setup.sh | bash
cp -v test/config_local.php.sauce config_local.php