Skip to content

Commit 2a1788a

Browse files
author
Jonathan Gaillard
committed
Merge pull request #78 from nubs/master
Integrate with coveralls.
2 parents c9acfca + 4215b9d commit 2a1788a

File tree

6 files changed

+502
-41
lines changed

6 files changed

+502
-41
lines changed

.coveralls.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
service_name: travis-ci
2+
src_dir: .
3+
coverage_clover: clover.xml
4+
json_path: coveralls-upload.json

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ php:
33
- 5.6
44
- 5.5
55
- 5.4
6-
script: php build.php
6+
script: ./build.php
7+
after_script: ./vendor/bin/coveralls -v

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# DWS Coding Standard
22
[![Build Status](https://travis-ci.org/dominionenterprises/dws-coding-standard.png)](https://travis-ci.org/dominionenterprises/dws-coding-standard)
3+
[![Code Coverage](http://img.shields.io/coveralls/dominionenterprises/dws-coding-standard.svg?style=flat)](https://coveralls.io/r/dominionenterprises/dws-coding-standard)
34

45
A fairly complete [PHP_CodeSniffer](http://www.squizlabs.com/php-codesniffer) coding standard. See the [standard document](standard.md) to
56
see what "sniffs" are enforced.

build.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
exit(1);
2424
}
2525

26+
$cloverCoverage = new PHP_CodeCoverage_Report_Clover();
27+
file_put_contents('clover.xml', $cloverCoverage->process($result->getCodeCoverage()));
28+
2629
$coverageFactory = new PHP_CodeCoverage_Report_Factory();
2730
$coverageReport = $coverageFactory->create($result->getCodeCoverage());
2831
if ($coverageReport->getNumExecutedLines() !== $coverageReport->getNumExecutableLines()) {

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"squizlabs/php_codesniffer": "~1.4.8"
2626
},
2727
"require-dev": {
28-
"phpunit/phpunit": "~4.1"
28+
"phpunit/phpunit": "~4.1",
29+
"satooshi/php-coveralls": "~0.6.1"
2930
}
3031
}

0 commit comments

Comments
 (0)