This is an automated email from the ASF dual-hosted git repository.
xushiyan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hudi-rs.git
The following commit(s) were added to refs/heads/main by this push:
new 0c6456e ci: use cargo tarpaulin to generate code coverage (#15)
0c6456e is described below
commit 0c6456e1e68e7dcea1e05cf151b11f362daa60ef
Author: Shiyan Xu <[email protected]>
AuthorDate: Sun May 5 22:53:06 2024 -0500
ci: use cargo tarpaulin to generate code coverage (#15)
Use https://github.com/xd009642/tarpaulin to generate coverage file, which
will be reported to https://app.codecov.io/gh/apache/hudi-rs
Fixes #6
---
.github/workflows/ci.yml | 11 +++++++++--
.gitignore | 4 ++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4bc8235..abe7ec3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -54,7 +54,14 @@ jobs:
test:
runs-on: ubuntu-latest
+ container:
+ image: xd009642/tarpaulin:0.29.1
+ options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v4
- - name: Unit test
- run: cargo test --no-fail-fast --all-targets --all-features --workspace
+ - name: Unit test with code coverage
+ run: cargo tarpaulin --verbose --no-fail-fast --all-features
--workspace --out xml
+ - name: Upload to codecov.io
+ uses: codecov/codecov-action@v4
+ with:
+ fail_ci_if_error: true
diff --git a/.gitignore b/.gitignore
index 3c2bbba..5f104d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,7 @@ __pycache__
# macOS
**/.DS_Store
+
+# coverage files
+*.profraw
+cobertura.xml