From 85d27b2f418cb5a7ef4953c829f9c7bc9d83cdc8 Mon Sep 17 00:00:00 2001 From: Craig Duncan Date: Wed, 29 Nov 2017 14:08:38 +0000 Subject: [PATCH] Provide code coverage using coveralls --- .coveralls.yml | 3 +++ .travis.yml | 7 +++++-- README.md | 5 +++-- composer.json | 3 ++- 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..bc71b4e --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,3 @@ +service_name: travis-ci +coverage_clover: clover.xml +json_path: coveralls.json diff --git a/.travis.yml b/.travis.yml index 7307866..3090644 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,8 +20,11 @@ install: - composer update $COMPOSER_OPTS script: - - ./vendor/bin/phpunit - - ./tests/lint.sh + - vendor/bin/phpunit --coverage-clover=clover.xml + - tests/lint.sh + +after_success: + - vendor/bin/coveralls git: depth: 5 diff --git a/README.md b/README.md index 320a221..c150fd6 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ # object-intruder A small PHP library to access private/protected properties/methods of objects -[![Build Status](https://img.shields.io/travis/duncan3dc/object-intruder.svg)](https://travis-ci.org/duncan3dc/object-intruder) -[![Latest Version](https://img.shields.io/packagist/v/duncan3dc/object-intruder.svg)](https://packagist.org/packages/duncan3dc/object-intruder) +[![Latest Stable Version](https://poser.pugx.org/duncan3dc/object-intruder/version.svg)](https://packagist.org/packages/duncan3dc/object-intruder) +[![Build Status](https://travis-ci.org/duncan3dc/object-intruder.svg?branch=master)](https://travis-ci.org/duncan3dc/object-intruder) +[![Coverage Status](https://coveralls.io/repos/github/duncan3dc/object-intruder/badge.svg)](https://coveralls.io/github/duncan3dc/object-intruder) ## Installation diff --git a/composer.json b/composer.json index c635944..4efe31c 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,8 @@ "php": "^5.6|^7.0" }, "require-dev": { - "phpunit/phpunit": "^5.6" + "phpunit/phpunit": "^5.6", + "satooshi/php-coveralls": "^1.0" }, "autoload": { "psr-4": {"duncan3dc\\ObjectIntruder\\": "src/"}