Skip to content

[ci] add ut coverage check #150

Draft
zjswhhh wants to merge 2 commits into
sonic-net:masterfrom
zjswhhh:ci
Draft

[ci] add ut coverage check #150
zjswhhh wants to merge 2 commits into
sonic-net:masterfrom
zjswhhh:ci

Conversation

@zjswhhh
Copy link
Copy Markdown
Contributor

@zjswhhh zjswhhh commented Mar 17, 2026

What I did

[ci] add ut coverage check
sign-off: Jing Zhang zhangjing@microsoft.com

Why I did it

How I verified it

Details if related

Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
Copilot AI review requested due to automatic review settings March 17, 2026 20:48
@mssonicbld
Copy link
Copy Markdown

/azp run

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Rust unit-test line coverage gate to the project’s CI tooling, enforcing a minimum coverage threshold during CI runs.

Changes:

  • Extend ci-all to include a new ci-coverage target.
  • Add ci-coverage Makefile target that installs coverage tooling and enforces --fail-under-lines 80.
  • Add a new GitHub Actions workflow to run cargo llvm-cov on pull requests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
Makefile Adds ci-coverage target and wires it into ci-all to enforce minimum line coverage.
.github/workflows/coverage.yml New PR workflow to run Rust line coverage (>= 80%) using cargo-llvm-cov.

Comment thread Makefile

ci-coverage:
rustup component add llvm-tools-preview
cargo install cargo-llvm-cov --locked || true
Comment thread .github/workflows/coverage.yml Outdated

- name: Install cargo-llvm-cov
run: |
cargo install cargo-llvm-cov --locked || true
Comment thread .github/workflows/coverage.yml Outdated
Comment on lines +18 to +26
- name: Install Rust (stable)
uses: dtolnay/rust-toolchain@stable

- name: Cargo cache
uses: Swatinem/rust-cache@v2

- name: Install LLVM tools for coverage
run: rustup component add llvm-tools-preview

Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
@mssonicbld
Copy link
Copy Markdown

/azp run

@zjswhhh zjswhhh marked this pull request as draft March 17, 2026 22:44
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.

3 participants