Skip to content

Commit dda5242

Browse files
committed
Display Coverage of CPP Unittests
Display CPP Unittest Coverage with lcov
1 parent c9619bc commit dda5242

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/check.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,15 @@ jobs:
7676
--nocache_test_results \
7777
--nostamp
7878
79+
- name: Install lcov
80+
run: |
81+
sudo apt-get update
82+
sudo apt-get install -y lcov
83+
84+
- name: Extract Coverage for kvs.cpp
85+
run: |
86+
REPORT=$(find "$(bazel info output_path)" -name _coverage_report.dat | head -n1)
87+
lcov \
88+
--rc lcov_branch_coverage=1 \
89+
--extract "$REPORT" "src/cpp/src/kvs.cpp" \
90+
--output-file kvs_coverage.info

0 commit comments

Comments
 (0)