Skip to content

Commit

Permalink
Merge pull request traderinteractive#13 from nubs/master
Browse files Browse the repository at this point in the history
Integrate with coveralls.
  • Loading branch information
Jonathan Gaillard committed Sep 5, 2014
2 parents 7f09ae7 + 5ffc34e commit 2dfd407
Show file tree
Hide file tree
Showing 6 changed files with 411 additions and 206 deletions.
4 changes: 4 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
service_name: travis-ci
src_dir: .
coverage_clover: clover.xml
json_path: coveralls-upload.json
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ before_script:
# wait for mongo, start is only needed for 2.4 package, see http://tldp.org/LDP/abs/html/devref1.html for description of this syntax.
- sudo service mongodb start; bash -c 'while ! exec 6<>/dev/tcp/localhost/27017; do echo "$(date) - still trying to connect to mongo"; sleep 1; done'
script: ./build.php
after_script: ./vendor/bin/coveralls -v
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tol-api-php
[![Build Status](http://img.shields.io/travis/dominionenterprises/tol-api-php.svg?style=flat)](https://travis-ci.org/dominionenterprises/tol-api-php)
[![Scrutinizer Code Quality](http://img.shields.io/scrutinizer/g/dominionenterprises/tol-api-php.svg?style=flat)](https://scrutinizer-ci.com/g/dominionenterprises/tol-api-php/)
[![Code Coverage](http://img.shields.io/scrutinizer/coverage/g/dominionenterprises/tol-api-php.svg?style=flat)](https://scrutinizer-ci.com/g/dominionenterprises/tol-api-php/)
[![Code Coverage](http://img.shields.io/coveralls/dominionenterprises/tol-api-php.svg?style=flat)](https://coveralls.io/r/dominionenterprises/tol-api-php)

[![Latest Stable Version](http://img.shields.io/packagist/v/dominionenterprises/tol-api.svg?style=flat)](https://packagist.org/packages/dominionenterprises/tol-api)
[![Total Downloads](http://img.shields.io/packagist/dt/dominionenterprises/tol-api.svg?style=flat)](https://packagist.org/packages/dominionenterprises/tol-api)
Expand Down
3 changes: 3 additions & 0 deletions build.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
exit(1);
}

$cloverCoverage = new PHP_CodeCoverage_Report_Clover();
file_put_contents('clover.xml', $cloverCoverage->process($result->getCodeCoverage()));

$coverageFactory = new PHP_CodeCoverage_Report_Factory();
$coverageReport = $coverageFactory->create($result->getCodeCoverage());
if ($coverageReport->getNumExecutedLines() !== $coverageReport->getNumExecutableLines()) {
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"satooshi/php-coveralls": "~0.6.1",
"squizlabs/php_codesniffer": "~1.5",
"dominionenterprises/dws-coding-standard": "~1.1",
"ext-mongo": ">=1.3.5,<2.0",
Expand Down
Loading

0 comments on commit 2dfd407

Please sign in to comment.