Skip to content

Commit

Permalink
Added coveralls to travis config
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdriel committed Mar 3, 2014
1 parent 7878ce0 commit 62cd133
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# for php-coveralls
src_dir: app
coverage_clover: build/logs/clover.xml
json_path: build/logs/coveralls-upload.json
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ env:

matrix:
include:
- php: 5.3
env:
- COVERALLS=1
- php: 5.3
env:
- PHPCS=1
Expand All @@ -16,6 +19,7 @@ before_script:
- sh -c "mysql -e 'CREATE DATABASE qdnatool_test;'"
- chmod -R 777 ./app/tmp
- composer install --dev --no-interaction --prefer-source
- sh -c "if [ "$COVERALLS" = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then pear channel-discover pear.cakephp.org; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then pear install --alldeps cakephp/CakePHP_CodeSniffer; fi"
- phpenv rehash
Expand All @@ -24,5 +28,8 @@ before_script:
script:
- sh -c "if [ '$PHPCS' = '1' ]; then phpcs -p --extensions=php --standard=CakePHP --ignore=Plugin --ignore=Vendor --ignore=webroot/js/ckeditor -n ./app; elif [ "$COVERALLS" == 1 ]; then cd ./app; ../vendors/bin/cake test app AllTests --stderr --coverage-clover ../build/logs/clover.xml else cd ./app; ../vendors/bin/cake test app AllTests --stderr; fi"

after_success:
- sh -c "if [ "$COVERALLS" = '1' ]; then cd ..; php vendors/bin/coveralls -c .coveralls.yml -v; fi"

notifications:
email: false

0 comments on commit 62cd133

Please sign in to comment.