Skip to content

feat: add test coverage reporting with Codecov badge#123

Open
imlk0 wants to merge 4 commits into
masterfrom
codecov
Open

feat: add test coverage reporting with Codecov badge#123
imlk0 wants to merge 4 commits into
masterfrom
codecov

Conversation

@imlk0

@imlk0 imlk0 commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add make run-test-coverage target using cargo-llvm-cov to collect Rust test coverage and generate Codecov-compatible JSON report
  • Update CI workflow (.github/workflows/test.yml) to run coverage tests and upload to Codecov
  • Add Codecov badge to README.md and README_zh.md

Changes

File Change
Makefile Add install-cargo-llvm-cov and run-test-coverage targets
.github/workflows/test.yml Replace make run-test with make run-test-coverage, add codecov/codecov-action@v5 upload step
README.md Add Codecov badge
README_zh.md Add Codecov badge

Notes

  • Requires CODECOV_TOKEN GitHub secret (configure at https://app.codecov.io)
  • fail_ci_if_error: false ensures CI still passes if token is not yet configured
  • Coverage scope: --all-targets matches existing cargo test behavior (lib + bins + tests)

Test Plan

  • cargo fmt --check passes
  • make -n run-test-coverage produces correct commands
  • make run-test-coverage successfully generates target/codecov.json (verified locally)
  • YAML syntax validated

🤖 Generated with Claude Code

@shankailun-aliyun

Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@shankailun-aliyun

Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start

@shankailun-aliyun

Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@shankailun-aliyun

Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@shankailun-aliyun

Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@shankailun-aliyun

Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start

…ns linker error

Rust 1.85.0 libprofiler_builtins on aarch64 references
__aarch64_cas8_sync / __aarch64_ldadd8_sync atomic builtins that are
not resolved by gcc. cargo-llvm-cov fails during build_script_build
linking. Upgrading aarch64 to 1.86.0 resolves this.

Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
@shankailun-aliyun

Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@shankailun-aliyun

Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants