From 6e30ac2b9d97bfe21100270e23c161d95a11366e Mon Sep 17 00:00:00 2001 From: Atsushi Takayama Date: Fri, 11 Sep 2015 00:42:11 +0900 Subject: [PATCH 1/2] Add coveralls setting --- .coveralls.yml | 5 +++++ .travis.yml | 1 + composer.json | 6 +++++- phpunit.xml.dist | 8 ++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..57fac49 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,5 @@ +service_name: travis-ci +src_dir: src +coverage_clover: clover.xml +json_path: coveralls-upload.json +exclude_no_stmt: true diff --git a/.travis.yml b/.travis.yml index 6299f3c..3b92f9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,3 +11,4 @@ install: - composer install script: - ./vendor/bin/phpunit + - if [ "$(php --version | grep 'PHP 5.6')" != "" ]; then ./vendor/bin/coveralls -v; fi diff --git a/composer.json b/composer.json index acc795e..04ddf2b 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,11 @@ "apache/thrift": "0.9.2" }, "require-dev": { - "phpunit/phpunit": "^4.8" + "phpunit/phpunit": "^4.8", + "satooshi/php-coveralls": "dev-master" + }, + "suggest": { + "ext-xdebug": "Allows code coverage reporting (pecl install xdebug)" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1da0ea4..1c6a2ff 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -25,4 +25,12 @@ test/ + + + src/ + + + + + From 3be3db289bd142ab0cf9cb4cbd8b28044f540781 Mon Sep 17 00:00:00 2001 From: Atsushi Takayama Date: Fri, 11 Sep 2015 03:47:43 +0900 Subject: [PATCH 2/2] Add coveralls badge to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d11eddd..eee465a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Convert a PHP array into an Apache Thrift struct type. -[![Build Status](https://travis-ci.org/edvakf/php-thrift-mapper.svg)](https://travis-ci.org/edvakf/php-thrift-mapper) +[![Build Status](https://travis-ci.org/edvakf/php-thrift-mapper.svg)](https://travis-ci.org/edvakf/php-thrift-mapper) [![Coverage Status](https://coveralls.io/repos/edvakf/php-thrift-mapper/badge.svg?branch=coveralls&service=github)](https://coveralls.io/github/edvakf/php-thrift-mapper?branch=coveralls) ## What is this?