This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-cpp.git


The following commit(s) were added to refs/heads/master by this push:
     new 50cf3f4   feat(codecov): add logo for code coverage (#216)
50cf3f4 is described below

commit 50cf3f4d57e04b2128240f3fc74bcdce85d4d1cf
Author: dinglei <[email protected]>
AuthorDate: Mon Jan 6 22:02:09 2020 +0800

     feat(codecov): add logo for code coverage (#216)
    
    * Add log for code coverage
    
    * feat(codecov): add logo for code coverage
---
 .travis.yml | 17 +++++++++++++++--
 README.md   |  1 +
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 2acbc0b..235cca4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,10 @@ language: cpp
 sudo: required
 dist: trusty
 
+addons:
+  apt:
+    packages: lcov
+
 install:
   - sudo apt-get update
   - sudo apt-get install -y git gcc-4.8 g++-4.8 autoconf cmake libtool wget 
unzip libbz2-dev zlib1g-dev
@@ -26,8 +30,17 @@ script:
   - ./build.sh test codecov noVerbose
 
 after_success:
-  - bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect 
coverage reports"
-
+  # Create lcov report
+  # capture coverage info
+  - lcov --directory . --capture --output-file coverage.info
+  # filter out system and extra files.
+  # To also not include test code in coverage add them with full path to the 
patterns: '*/tests/*'
+  - lcov --remove coverage.info '/usr/*' 
'/home/travis/build/*/rocketmq-client-cpp/bin/*' 
'/home/travis/build/*/rocketmq-client-cpp/libs/*' --output-file coverage.info
+  # output coverage data for debugging (optional)
+  - lcov --list coverage.info
+  # Uploading to CodeCov
+  # '-f' specifies file(s) to use and disables manual coverage gathering and 
file search which has already been done above
+  - bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov 
did not collect coverage reports"
 
 matrix:
   include:
diff --git a/README.md b/README.md
index 42a315e..aef6ad7 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
 # RocketMQ-Client-CPP
 
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
 
[![TravisCI](https://travis-ci.org/apache/rocketmq-client-cpp.svg)](https://travis-ci.org/apache/rocketmq-client-cpp)
+[![CodeCov](https://codecov.io/gh/apache/rocketmq-client-cpp/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/rocketmq-client-cpp)
 
 RocketMQ-Client-CPP is the C/C++ client of Apache RocketMQ, a distributed 
messaging and streaming platform with low latency, high performance and 
reliability, trillion-level capacity and flexible scalability.
 

Reply via email to