ci: Rust coverage gate (cargo-llvm-cov 80%) + vitest scope fix + codecov#42
Merged
Conversation
Eliminates "Failed to parse *.rs" warnings from @vitest/coverage-v8 when scanning src/ for uncovered files. Rust sources were never real TS coverage targets; narrowing the glob has no effect on coverage %. Adds reporter: ['text', 'lcov'] so lcov.info is emitted for codecov upload (change 3 of A5 task).
- Add llvm-tools-preview component to setup-rust-toolchain in lint-and-build job so cargo-llvm-cov instrumentation is available. - Install cargo-llvm-cov via taiki-e/install-action (pinned SHA v2.81.3). - Replace plain `cargo test` in lint-and-build with `cargo llvm-cov --fail-under-lines 80` (Constitution X gate). Other jobs (macos-sanity, vector-parity) keep plain cargo test. - Add codecov/codecov-action upload (pinned SHA v6.0.1) for both rust-lcov.info (flag: rust) and packages/codec/coverage/lcov.info (flag: ts). fail_ci_if_error: false — codecov hiccup must not break CI. - Add minimal codecov.yml: rust flag is informational (advisory), ts flag is default (blocking on threshold regression). Measured Rust line coverage: 91.95% (gate: 80%).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17 (re-audit last item A5).
Changes
1. Rust coverage gate (
lint-and-buildjob)components: llvm-tools-previewto the existingactions-rust-lang/setup-rust-toolchainstep.cargo-llvm-covviataiki-e/install-action@25435dc8dd3baed7417e0c96d3fe89013a5b2e09(v2.81.3, pinned SHA).cargo testinlint-and-buildwithcargo llvm-cov --fail-under-lines 80 --lcov --output-path rust-lcov.info. CI fails if Rust line coverage drops below 80% (Constitution X). Other jobs (macos-sanity,vector-parity) keep plaincargo test.2. Vitest coverage scope fix
coverage.includefromsrc/**tosrc/**/*.tsinpackages/codec/vitest.config.ts.@vitest/coverage-v8(cosmetic noise introduced in the TS6/vitest4 wave).reporter: ['text', 'lcov']sopackages/codec/coverage/lcov.infois emitted for codecov.3. Codecov upload (non-blocking)
codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354(v6.0.1, pinned SHA) after coverage runs.rust-lcov.info(flag:rust) andpackages/codec/coverage/lcov.info(flag:ts).fail_ci_if_error: false— a codecov outage must not break CI.codecov.ymlat repo root: Rust patch/project status isinformational(advisory only); TS flag uses default (blocking on threshold regression).Measurements
.rsparse warnings: gone (confirmed locally)Pinned action SHAs
taiki-e/install-action25435dc8dd3baed7417e0c96d3fe89013a5b2e09codecov/codecov-actione79a6962e0d4c0c17b229090214935d2e33f8354