This is an automated email from the ASF dual-hosted git repository.
weibin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-graphar.git
The following commit(s) were added to refs/heads/main by this push:
new 60fcedeb feat(devinfra): Add test coverage to CI to measure the
covering code of unit test and add banner to README (C++)
60fcedeb is described below
commit 60fcedeb4b30488709a8f19bfc4f18afe963543f
Author: Elssky <[email protected]>
AuthorDate: Fri Aug 16 10:14:55 2024 +0800
feat(devinfra): Add test coverage to CI to measure the covering code of
unit test and add banner to README (C++)
---
.github/workflows/ci.yml | 18 ++++++++++++++++--
README.md | 1 +
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c07bb1f8..d53331d1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -60,7 +60,7 @@ jobs:
libarrow-dataset-dev \
libarrow-acero-dev \
libparquet-dev
- sudo apt-get install -y libboost-graph-dev ccache libcurl4-openssl-dev
doxygen
+ sudo apt-get install -y libboost-graph-dev ccache libcurl4-openssl-dev
doxygen lcov
# install benchmark
git clone --branch v1.8.3 https://github.com/google/benchmark.git
--depth 1
@@ -83,7 +83,7 @@ jobs:
run: |
mkdir build
cd build
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON
-DBUILD_BENCHMARKS=ON
+ cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON
-DBUILD_BENCHMARKS=ON -DCMAKE_CXX_FLAGS="--coverage"
-DCMAKE_C_FLAGS="--coverage"
- name: Cpp Format and lint
working-directory: "cpp/build"
@@ -146,12 +146,26 @@ jobs:
run: |
export ASAN_OPTIONS=detect_leaks=0
ctest --output-on-failure
+
+ - name: Generate coverage info
+ working-directory: "cpp/build"
+ run: |
+ lcov --capture --directory . --output-file coverage.info
+ lcov --remove coverage.info '/usr/*' --output-file coverage.info
+ lcov --list coverage.info
+
+ - name: Upload coverage reports to Codecov
+ uses: codecov/[email protected]
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
- name: Benchmark
working-directory: "cpp/build"
run: |
./graph_info_benchmark
./arrow_chunk_reader_benchmark
+
+
- name: Use Static Arrow
working-directory: "cpp"
diff --git a/README.md b/README.md
index dd23d879..c0141b8e 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@
CI](https://github.com/apache/incubator-graphar/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-graphar/actions)
[](https://github.com/apache/incubator-graphar/actions)
+[](https://codecov.io/gh/apache/incubator-graphar)
[](https://graphar.apache.org/docs/)
[![Good First
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]