-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodecov.yml
More file actions
64 lines (58 loc) · 2.36 KB
/
codecov.yml
File metadata and controls
64 lines (58 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# =============================================================================
# Codecov Configuration
# https://docs.codecov.com/docs/codecov-yaml
# =============================================================================
codecov:
require_ci_to_pass: true
notify:
after_n_builds: 1 # Single CI job, notify after first build
# =============================================================================
# Coverage Configuration
# =============================================================================
coverage:
precision: 2
round: down
range: "65...100" # Lower bound matches vitest branches threshold (65%)
# ---------------------------------------------------------------------------
# Status Checks
# These appear as GitHub status checks on PRs
# ---------------------------------------------------------------------------
status:
project:
default:
target: 78% # Match vitest threshold
threshold: 2% # Allow 2% drop without failing
base: auto
if_ci_failed: error
patch:
default:
target: 75% # New code should be well-tested
threshold: 5% # More lenient for patches
base: auto
if_ci_failed: error
# ---------------------------------------------------------------------------
# Ignore Patterns
# These files are excluded from coverage calculation
# ---------------------------------------------------------------------------
ignore:
- "src/types/**" # Type definitions only
- "src/index.ts" # CLI entry point
- "src/**/index.ts" # Re-export modules
- "**/*.d.ts" # TypeScript declaration files
# =============================================================================
# GitHub Checks
# Inline coverage annotations in PR diffs
# =============================================================================
github_checks:
annotations: true
# =============================================================================
# PR Comments
# Configure how coverage is displayed in PR comments
# =============================================================================
comment:
layout: "header, diff, files, footer"
behavior: default
require_changes: true # Only comment if coverage changes
require_base: true # Require base report for comparison
require_head: true # Require head report
only_pulls: true # Only comment on PRs, not push commits