From 6fcc4d0dec6c96d9f2ef1938f2ad49ed8e4a1a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JasonXuDeveloper=20-=20=E5=82=91?= Date: Thu, 23 Apr 2026 20:31:53 +1000 Subject: [PATCH] chore(ci): relax codecov patch check to 85% floor + informational MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codecov was set to target: auto with a 1% threshold on both project and patch, so every PR had to stay within 1% of the current ~95% project coverage. That ratchets tighter each time new easily-tested code is added, and penalises PRs that touch editor-window callbacks or polling loops which are not cleanly unit-testable. Switch to a fixed 85% floor with 2% threshold on both checks, and mark the patch check informational so the Codecov comment still surfaces dropped lines (useful for review) but does not block merge. The project check still guards against real regressions. Co-authored-by: Claude Opus 4.7 Signed-off-by: JasonXuDeveloper - 傑 --- codecov.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/codecov.yml b/codecov.yml index a5edd97a..3456f0fe 100644 --- a/codecov.yml +++ b/codecov.yml @@ -5,12 +5,23 @@ coverage: status: project: default: - target: auto - threshold: 1% + # Floor at 85% so normal drift (a few hard-to-unit-test editor paths) + # does not fail the check. Base project is ~95%, so there is plenty of + # headroom without ratcheting it tighter on every PR. + target: 85% + threshold: 2% patch: default: - target: auto - threshold: 1% + # Same 85% floor for added/changed lines. Editor-window callbacks + # (OnFocus, polling schedule) are not cleanly unit-testable, so we + # accept a handful of uncovered lines per PR instead of chasing + # auto-vs-base noise. + target: 85% + threshold: 2% + # Informational: show the comment (so reviewers see where coverage + # dropped) but never block the merge. The project check above still + # guards against real regressions. + informational: true # Fix Docker container path prefix in coverage reports # Unity test runner generates paths like /github/workspace/UnityProject/...