-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodecov.yml
More file actions
149 lines (138 loc) · 3.94 KB
/
codecov.yml
File metadata and controls
149 lines (138 loc) · 3.94 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# SPDX-FileCopyrightText: 2025 RAprogramm <andrey.rozanov.vl@gmail.com>
#
# SPDX-License-Identifier: MIT
# Codecov configuration for masterror project
# Documentation: https://docs.codecov.com/docs/codecov-yaml
# Validate: curl -X POST --data-binary @.github/codecov.yml https://codecov.io/validate
codecov:
# Default branch for coverage comparison
branch: main
# Always use YAML from main branch for consistency
strict_yaml_branch: main
# Maximum age of report before expiration (12 hours)
max_report_age: 12h
# Require CI to pass before processing coverage
require_ci_to_pass: true
# Notify only on status changes to reduce noise
notify:
wait_for_ci: true
coverage:
# Precision for coverage percentage (2 decimal places)
precision: 2
# Round down to be conservative
round: down
# Coverage range: 90-100% (red to green)
range: 90..100
status:
# Project-level coverage status check
project:
default:
# Target: maintain 95% minimum coverage
target: 95%
# Threshold: allow max 1% drop before failing
threshold: 1%
# Compare against parent commit
base: auto
# Fail if CI fails
if_ci_failed: error
# Check all commits, not just PRs
only_pulls: false
# Include files with no coverage changes
if_no_uploads: error
# Include files not in diff
if_not_found: success
# Patch-level coverage status check (new code only)
patch:
default:
# New code must be 95% covered minimum
target: 95%
# Allow 1% threshold for edge cases
threshold: 1%
base: auto
if_ci_failed: error
# Only check patches in PRs
only_pulls: true
if_no_uploads: error
if_not_found: success
# Changes status (diff between head and base)
changes:
default:
base: auto
if_ci_failed: error
if_no_uploads: error
if_not_found: success
# Paths to ignore from coverage reports
ignore:
# Integration tests directory
- "tests/**/*"
# Benchmarks
- "benches/**/*"
# Examples
- "examples/**/*"
# Documentation
- "docs/**/*"
# Build scripts
- "build.rs"
- "build/**/*"
# Test modules inside src/ (all workspace members)
- "**/tests.rs"
- "**/test_*.rs"
- "**/*_test.rs"
# CI/CD configuration
- ".github/**/*"
- ".cargo/**/*"
# Scripts
- ".scripts/**/*"
- ".hooks/**/*"
# License files
- "LICENSES/**/*"
# Generated/temporary files
- "target/**/*"
# Component isolation using flags
# Note: Flags require separate uploads with -F flag in CI
# Example: cargo llvm-cov --lcov --output-path lcov-main.info
# codecov -f lcov-main.info -F main
flag_management:
# Default rules for all flags
default_rules:
# Don't carry forward missing flags by default
carryforward: false
# Require manual flag specification
statuses:
- type: project
target: auto
- type: patch
target: auto
# Pull request comment configuration
comment:
# Use condensed layout (free tier compatible)
layout: "condensed_header, condensed_files, condensed_footer"
# Update existing comment instead of creating new ones
behavior: default
# Always post comment, even if no changes
require_changes: false
# Require base report for comparison
require_base: yes
# Require head report to post comment
require_head: yes
# Show carryforward flags in comment
show_carryforward_flags: true
# Show project coverage in comment
hide_project_coverage: false
# Show additional metrics
after_n_builds: 1
# GitHub integration settings
github_checks:
# Enable inline annotations for uncovered lines
annotations: true
# Ignore specific commits (e.g., README-only changes)
ignore:
- "README.md"
- "README.ru.md"
- "README.template.md"
- "*.md"
- "LICENSE*"
- ".gitignore"
- ".rustfmt.toml"
- "deny.toml"
- "Makefile.toml"