Tig 1 月之前
父节点
当前提交
e793dcb1de
共有 1 个文件被更改,包括 74 次插入0 次删除
  1. 74 0
      codecov.yml

+ 74 - 0
codecov.yml

@@ -0,0 +1,74 @@
+# Codecov configuration for Terminal.Gui
+# Documentation: https://docs.codecov.com/docs/codecov-yaml
+
+# Coverage targets and thresholds
+coverage:
+  precision: 2
+  round: down
+  range: "60...90"  # Yellow between 60-90%, green above 90%
+  
+  status:
+    # Overall project coverage
+    project:
+      default:
+        target: 70%         # Minimum target coverage
+        threshold: 1%       # Allow 1% decrease without failing
+        base: auto          # Compare against base branch (v2_develop)
+        if_ci_failed: error # Fail if CI fails
+        
+    # Per-patch (PR) coverage
+    patch:
+      default:
+        target: 70%         # New code should have 70%+ coverage
+        threshold: 5%       # Allow 5% variance
+        base: auto
+        if_ci_failed: error
+
+# Comment configuration for PRs
+comment:
+  layout: "diff, files, footer"
+  behavior: default           # Update existing comment
+  require_changes: false      # Always comment
+  require_base: true           # Require base coverage to compare
+  require_head: true           # Require head coverage
+  branches:
+    - v2_develop
+    - v2_release
+
+# Flag-based coverage grouping (matches your workflow flags)
+flags:
+  unittests-nonparallel:
+    carryforward: false       # Don't carry forward if missing
+    paths:
+      - Terminal.Gui/
+  
+  unittests-parallel:
+    carryforward: false
+    paths:
+      - Terminal.Gui/
+  
+  integrationtests:
+    carryforward: false
+    paths:
+      - Terminal.Gui/
+
+# Files and paths to ignore
+ignore:
+  - "Examples/**/*"           # Example projects
+  - "Tests/**/*"              # Test projects themselves
+  - "UnitTests/**/*"          # Legacy test location
+  - "docfx/**/*"              # Documentation
+  - "Scripts/**/*"            # PowerShell scripts
+  - "**/*.Designer.cs"        # Auto-generated files
+  - "**/obj/**/*"             # Build artifacts
+  - "**/bin/**/*"             # Build artifacts
+
+# # Path fixes (normalize Windows paths to Unix)
+# fixes:
+#   - "C:/Users/runner/work/Terminal.Gui/Terminal.Gui/::" # Windows CI paths
+#   - "D:/a/Terminal.Gui/Terminal.Gui/::"                  # Alternative Windows paths
+
+# Only process coverage from these branches
+branches:
+  - v2_develop
+  - v2_release