-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodecov.yml
More file actions
38 lines (34 loc) · 1.19 KB
/
codecov.yml
File metadata and controls
38 lines (34 loc) · 1.19 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
# Codecov configuration
# https://docs.codecov.com/docs/codecovyml-reference
# Exclude files from coverage calculation
ignore:
# Integration-only code (requires real database)
- "examples/hello-mysql/internal/modules/users/repo_mysql.go"
# Untestable entry points (robust pattern)
- "**/cmd/**/main.go"
# Mocks and generated code (best practice)
- "**/*_mock.go"
- "**/mocks/**"
coverage:
status:
# Project coverage: overall repository coverage check
project:
default:
# target: auto uses the base branch coverage as the target
# PRs must not decrease overall coverage
target: auto
# threshold: allows up to 1% drop before failing
# prevents flaky failures from minor fluctuations
threshold: 1%
# Patch coverage: coverage of new/changed lines only
patch:
default:
# 80% of new/changed lines must be covered by tests
# encourages testing new code while allowing flexibility
target: 80%
# PR comment configuration
comment:
# Layout sections: header, coverage diff, flags, file list
layout: "header,diff,flags,files"
# Posts new comment on each push, updates existing comment
behavior: default