Repository navigation
Expand file tree
/
Copy pathcodecov.yml
More file actions
98 lines (88 loc) · 1.8 KB
/
Copy pathcodecov.yml
File metadata and controls
98 lines (88 loc) · 1.8 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
# Codecov Configuration for SAGE Project
# https://docs.codecov.com/docs/codecov-yaml
codecov:
require_ci_to_pass: true
notify:
wait_for_ci: true
# 告诉 Codecov 如何处理文件移动/重命名
# 这样移动的文件不会被算作完全新增的代码
parsers:
gcov:
branch_detection:
conditional: true
loop: true
method: false
macro: false
coverage:
precision: 2
round: down
range: "50...80"
status:
project:
default:
target: 50%
threshold: 1%
if_ci_failed: error
patch:
default:
target: auto
threshold: 5%
if_ci_failed: error
only_pulls: true
# 包级别覆盖率要求
package:
foundation:
target: 60%
runtime:
target: 50%
stream:
target: 50%
serving:
target: 50%
cli:
target: 50%
tools:
target: 50%
sage-apps:
target: 40%
sage-benchmark:
target: 40%
sage-studio:
target: 40%
comment:
layout: "reach,diff,flags,tree,footer"
behavior: default
require_changes: false
require_base: false
require_head: true
# 忽略测试文件和自动生成的代码
ignore:
- "**/*_test.py"
- "**/test_*.py"
- "**/tests/**"
- "**/__pycache__/**"
- "**/build/**"
- "**/dist/**"
- "**/.venv/**"
- "**/venv/**"
- "**/.pytest_cache/**"
- "**/*.egg-info/**"
- "**/temp_*.py"
- "**/update_*.py"
- "examples/**" # 示例代码不需要测试覆盖
- "tutorials/**" # 教程代码不需要测试覆盖
- "**/benchmark_memory/experiment/**" # 实验性 benchmark 代码
# 标记不同的测试类型
flag_management:
default_rules:
carryforward: true
statuses:
- type: project
target: auto
- type: patch
target: auto
flags:
unittests:
paths:
- packages/
carryforward: true