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/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? 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/ + + + + +