-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcodecov.yml
More file actions
84 lines (77 loc) · 2.57 KB
/
codecov.yml
File metadata and controls
84 lines (77 loc) · 2.57 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
# A more comprehensive Codecov configuration
codecov:
# Require CI to pass before Codecov processes reports. This ensures that
# coverage is only measured on successful builds.
require_ci_to_pass: true
notify:
# Wait for CI to finish before sending notifications.
wait_for_ci: true
coverage:
# Set a higher default target for project and patch coverage.
# This encourages a better testing culture.
status:
project:
default:
target: 70%
threshold: 2% # Allow for a small drop in coverage
patch:
default:
target: 80% # New code should be well-tested
threshold: 0% # Do not allow new code to decrease coverage
parsers:
v1:
include_full_missed_files: true
# Configure how coverage is displayed.
range: '70...100'
round: down
precision: 2
# Ignore files that are not relevant for code coverage.
# This keeps the coverage report clean and focused on the source code.
ignore:
- '**/dist/**/*'
- '**/*.mock*'
- '**/*.mock-data/*'
- '**/*.data.*'
- '**/node_modules/**/*'
- '**/*.d.ts'
- '**/tests/**/*.ts'
- '**/*.test.ts'
- '**/*.spec.ts'
- '**/vitest.config.*'
- '**/tsconfig.*.json'
- '**/tsconfig.json'
- '**/typedoc.json'
- '**/*.md'
- '**/LICENSE'
- '**/*.json'
- 'e2e/**/*' # E2E tests are not unit tests
- 'tools/**/*' # Tooling scripts
- 'scripts/**/*' # Other scripts
# Configure the comment that Codecov posts on pull requests.
comment:
layout: 'header, diff, components, files'
behavior: default
require_changes: false # Post a comment even if there are no coverage changes
require_head: true # Only post a comment if there is a coverage report for the head commit
component_management:
default_rules:
# Carry forward coverage from previous commits for all components.
carryforward: true
individual_components:
# This rule applies to all components that start with "package-".
# It is expected that the CI script uploads coverage reports with components
# like "package-davinci-client", "package-oidc-client", etc.
# This makes the configuration future-proof for new packages.
- component_id: package-*
paths:
- packages/ # Only consider files in the packages directory for these components
statuses:
- type: project
target: 80% # Higher target for packages
threshold: 2%
- type: patch
target: 90% # New code in packages should be very well-tested
threshold: 0%
# Enable bundle analysis to track the size of the published packages.
bundle_analysis:
status: 'informational'