You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Use diff-cover changed-line coverage as the changed-code gate; keep
the overall coverage delta gate at -0.1% and JaCoCo reports as
summary-only snapshots.
- Handle non-Java PRs: when diff-cover reports no changed Java lines
(workflow-only, docs-only, proto-only), emit NA and treat it as
SKIPPED in the enforcement step so the gate does not wrongly fail.
- Harden the diff-cover step: guard against empty SRC_ROOTS before
invoking diff-cover, verify diff-cover.json was written, and surface
exit codes in failure messages.
- Clarify metric semantics in the step summary: Changed-line is LINE
coverage (diff-cover) while Overall / Delta are INSTRUCTION coverage
(jacoco-report).
Note: Changed-line uses LINE coverage (diff-cover); Overall/Delta use INSTRUCTION coverage (jacoco-report). The two counters are not directly comparable.
echo "_Note: Changed-line uses LINE coverage (diff-cover); Overall/Delta use INSTRUCTION coverage (jacoco-report). The two counters are not directly comparable._"
385
458
} >> "$GITHUB_STEP_SUMMARY"
386
459
387
460
# 4) Decide CI pass/fail
@@ -391,14 +464,9 @@ jobs:
391
464
exit 1
392
465
fi
393
466
394
-
if [ -z "$PR_CHANGED" ] || [ "$PR_CHANGED" = "NaN" ]; then
395
-
echo "No changed-files coverage value detected, skip changed-files gate."
396
-
exit 0
397
-
fi
398
-
399
-
if [ "$CHANGED_OK" -ne 1 ]; then
400
-
echo "Coverage gate failed: changed files coverage must be > 60%."
401
-
echo "changed=${PR_CHANGED}%"
467
+
if [ "$CHANGED_LINE_OK" -ne 1 ]; then
468
+
echo "Coverage gate failed: changed-line coverage must be > 60%."
0 commit comments