Skip to content

Commit

Permalink
Merge pull request #73 from FriendsOfCake/master-codecov
Browse files Browse the repository at this point in the history
Master codecov
  • Loading branch information
jadb committed Feb 13, 2016
2 parents ab2a4b9 + ccd8bed commit 015cf4f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ matrix:
include:
php: 5.4
env:
- COVERALLS=1
- CODECOVERAGE=1
php: 5.4
env:
- PHPCS=1
Expand Down
4 changes: 2 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Using this project for your CakePHP plugin will do the following:

- Run the unit tests on travis-ci, for the defined matrix.
- Run phpcs (PHP_CodeSniffer) on your plugin code to check for coding standards violations using the CakePHP standard
- Uploads code coverage reports to coveralls.io.
- Uploads code coverage reports to codecov.io.

Make sure you have the travis webhook enabled in github for your plugin, and also add your repo to coveralls.io
Make sure you have the travis webhook enabled in github for your plugin, and also add your repo to codecov.io

## Quick Install

Expand Down
5 changes: 3 additions & 2 deletions after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ if [ -d ../cakephp/app ]; then
cd ../cakephp/app
fi

if [ "$COVERALLS" = '1' ]; then
php vendor/bin/coveralls -c .coveralls.yml -v;
if [ "$CODECOVERAGE" == '1' ]; then
wget -O codecov.sh https://codecov.io/bash
bash codecov.sh
fi
8 changes: 0 additions & 8 deletions before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ for dep in $REQUIRE; do
composer require --no-interaction --prefer-source $dep;
done

if [ "$COVERALLS" = '1' ]; then
composer require satooshi/php-coveralls:dev-master
fi

if [ "$PHPCS" != '1' ]; then
composer global require 'phpunit/phpunit=3.7.38'
ln -s ~/.composer/vendor/phpunit/phpunit/PHPUnit ./Vendor/PHPUnit
Expand All @@ -100,7 +96,3 @@ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
</whitelist>
</filter>
</phpunit>" > phpunit.xml

echo "# for php-coveralls
coverage_clover: build/logs/clover.xml
json_path: build/logs/coveralls-upload.json" > .coveralls.yml
4 changes: 2 additions & 2 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ fi

EXIT_CODE=0

if [ "$COVERALLS" == 1 ]; then
./Console/cake test $PLUGIN_NAME All$PLUGIN_NAME --stderr --coverage-clover build/logs/clover.xml
if [ "$CODECOVERAGE" == 1 ]; then
./Console/cake test $PLUGIN_NAME All$PLUGIN_NAME --stderr --coverage-clover clover.xml
EXIT_CODE="$?"
elif [ -z "$FOC_VALIDATE" ]; then
./Console/cake test $PLUGIN_NAME All$PLUGIN_NAME --stderr
Expand Down
2 changes: 1 addition & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fi

CYAN="\033[0;36m"
NO_COLOUR="\033[0m"
echo -e "${CYAN}Remember to setup your plugin on https://coveralls.io/ for coverage tracking${NO_COLOUR}"
echo -e "${CYAN}Remember to setup your plugin on https://codecov.io/ for coverage tracking${NO_COLOUR}"
echo -e ""
echo -e "${CYAN}Make sure you have the http://travis-ci.org webhook enabled in github for your plugin${NO_COLOUR}"
echo -e ""
Expand Down
9 changes: 4 additions & 5 deletions templates/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ env:
- REQUIRE=""

matrix:
- DB=mysql CAKE_VERSION=2.4
- DB=mysql CAKE_VERSION=2.5
- DB=mysql CAKE_VERSION=2.6
- DB=mysql CAKE_VERSION=2.7
- DB=mysql CAKE_VERSION=2.8

matrix:
include:
- php: 5.4
env:
- DB=mysql
- CAKE_VERSION=2.4
- COVERALLS=1
- CAKE_VERSION=2.7
- CODECOVERAGE=1
- php: 5.4
env:
- PHPCS=1
Expand Down

0 comments on commit 015cf4f

Please sign in to comment.