Skip to content

Commit

Permalink
Merge pull request traderinteractive#9 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 0362765 + d8d8e33 commit 6e824d6
Show file tree
Hide file tree
Showing 6 changed files with 508 additions and 48 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 @@ -4,3 +4,4 @@ php:
- 5.5
- 5.4
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
Expand Up @@ -3,7 +3,7 @@ A PHP client for NetAcuity, a geoip lookup service.

[![Build Status](http://img.shields.io/travis/dominionenterprises/netacuity-php.svg?style=flat)](https://travis-ci.org/dominionenterprises/netacuity-php)
[![Scrutinizer Code Quality](http://img.shields.io/scrutinizer/g/dominionenterprises/netacuity-php.svg?style=flat)](https://scrutinizer-ci.com/g/dominionenterprises/netacuity-php/)
[![Code Coverage](http://img.shields.io/scrutinizer/coverage/g/dominionenterprises/netacuity-php.svg?style=flat)](https://scrutinizer-ci.com/g/dominionenterprises/netacuity-php/)
[![Code Coverage](http://img.shields.io/coveralls/dominionenterprises/netacuity-php.svg?style=flat)](https://coveralls.io/r/dominionenterprises/netacuity-php)

[![Latest Stable Version](http://img.shields.io/packagist/v/dominionenterprises/netacuity.svg?style=flat)](https://packagist.org/packages/dominionenterprises/netacuity)
[![Total Downloads](http://img.shields.io/packagist/dt/dominionenterprises/netacuity.svg?style=flat)](https://packagist.org/packages/dominionenterprises/netacuity)
Expand Down
3 changes: 3 additions & 0 deletions build.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,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 @@ -18,6 +18,7 @@
},
"require-dev": {
"phpunit/phpunit": "~4.1",
"satooshi/php-coveralls": "~0.6.1",
"squizlabs/php_codesniffer": "~1.5"
},
"autoload": {
Expand Down
Loading

0 comments on commit 6e824d6

Please sign in to comment.