From 4fc2a6c2e4726841e25c53dbc284a55b9299aef6 Mon Sep 17 00:00:00 2001 From: Felix Becker Date: Tue, 6 Sep 2016 12:55:05 +0200 Subject: [PATCH] Add coverage reporting (#14) * Add coverage reporting * Add badge * Add codecov.yml --- .travis.yml | 5 ++++- README.md | 1 + codecov.yml | 16 ++++++++++++++++ composer.json | 3 ++- 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 codecov.yml diff --git a/.travis.yml b/.travis.yml index d44af93e..578baacb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,4 +7,7 @@ install: - composer install script: - - vendor/bin/phpunit --bootstrap vendor/autoload.php tests + - vendor/bin/phpunit --coverage-clover=coverage.xml --whitelist src --bootstrap vendor/autoload.php tests + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index 35853bf8..959e7397 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Version](https://img.shields.io/packagist/v/felixfbecker/language-server.svg)](https://packagist.org/packages/felixfbecker/language-server) [![Build Status](https://travis-ci.org/felixfbecker/php-language-server.svg?branch=master)](https://travis-ci.org/felixfbecker/php-language-server) +[![Coverage](https://codecov.io/gh/felixfbecker/php-language-server/branch/master/graph/badge.svg)](https://codecov.io/gh/felixfbecker/php-language-server) [![Dependency Status](https://gemnasium.com/badges/github.com/felixfbecker/php-language-server.svg)](https://gemnasium.com/github.com/felixfbecker/php-language-server) [![License](https://img.shields.io/packagist/l/felixfbecker/language-server.svg)](https://github.com/felixfbecker/php-language-server/blob/master/LICENSE.txt) diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..5197a122 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,16 @@ + +coverage: + status: + project: + default: + target: auto + threshold: null + base: auto + +comment: + layout: "header, diff, tree, changes" + behavior: default + require_changes: false # if true: only post the comment if coverage changes + branches: null + flags: null + paths: null diff --git a/composer.json b/composer.json index caec3585..6062c5e2 100644 --- a/composer.json +++ b/composer.json @@ -42,6 +42,7 @@ } }, "require-dev": { - "phpunit/phpunit": "^5.5" + "phpunit/phpunit": "^5.5", + "phpunit/php-code-coverage": "^4.0" } }