Skip to content

Commit 714c0e8

Browse files
committed
chore(ci): adjust Codecov YAML
1 parent 4ef3e05 commit 714c0e8

File tree

1 file changed

+55
-42
lines changed

1 file changed

+55
-42
lines changed

codecov.yml

Lines changed: 55 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,65 @@
1+
# Codecov repository YAML
12
# https://docs.codecov.com/docs/codecov-yaml
2-
33
coverage:
44

55
# https://docs.codecov.com/docs/commit-status
66
status:
7+
78
project:
89
default:
9-
target: 80% # Default target for all components
10-
threshold: 10% # Allowable drop in coverage without failing
11-
if_not_found: success # If no coverage report is found, don't fail
12-
if_ci_failed: error # CI failure should fail coverage check
13-
14-
# Components for focused coverage metrics
15-
controllers:
16-
paths:
17-
- "Dotnet.Samples.AspNetCore.WebApi/Controllers/"
18-
services:
19-
paths:
20-
- "Dotnet.Samples.AspNetCore.WebApi/Services/"
21-
22-
patch:
23-
default:
24-
target: 80% # Target for changed lines
25-
threshold: 10%
10+
target: 80% # Default target for all components
11+
threshold: 10% # Allowable drop in coverage without failing
12+
if_not_found: success # If no coverage report is found, don't fail
13+
if_ci_failed: error # CI failure should fail coverage check
14+
15+
patch:
16+
default:
17+
target: 80% # Target for changed lines
18+
threshold: 10% # Allowable drop in coverage without failing
19+
20+
component_management:
21+
22+
default_rules: # default rules that will be inherited by all components
23+
statuses:
24+
- type: project # components that don't have a status defined will have a project type one
25+
target: auto
26+
branches:
27+
- "!main"
28+
29+
individual_components:
30+
- component_id: controllers # this is an identifier that should not be changed
31+
name: Controllers # this is a display name, and can be changed freely
32+
paths:
33+
- 'src/Dotnet.Samples.AspNetCore.WebApi/Controllers/'
34+
- component_id: services
35+
name: Services
36+
paths:
37+
- 'src/Dotnet.Samples.AspNetCore.WebApi/Services/'
38+
39+
comment:
40+
layout: "header, diff, flags, components"
2641

2742
# https://docs.codecov.com/docs/ignoring-paths
2843
ignore:
29-
# Ignore common project metadata and config files
30-
- '.*\.sln' # Solution files
31-
- '.*\.csproj' # C# project files
32-
- '.*\.json' # JSON config files (e.g., appsettings)
33-
- '.*\.yml' # YAML config files (e.g., pipelines)
34-
- '.*\.png' # Image assets (e.g., Swagger diagram)
35-
36-
# Ignore test project entirely
37-
- '.*\/test\/.*' # Any file in the test folder (unit/integration/utils)
38-
39-
# Ignore infrastructure and support folders anywhere in the project
40-
- '.*\/Data\/.*' # Repositories, DbContext, database files
41-
- '.*\/Enums\/.*' # Enums like Position
42-
- '.*\/Mappings\/.*' # AutoMapper profiles
43-
- '.*\/Migrations\/.*' # EF Core migration artifacts
44-
- '.*\/Models\/.*' # Domain and DTO models
45-
- '.*\/Properties\/.*' # launchSettings.json or other system files
46-
- '.*\/Utilities\/.*' # Static helper and extension classes
47-
48-
# Ignore application entry point and documentation files
49-
- '.*\/Program\.cs' # ASP.NET Core entry point
50-
- '.*\/\.gitignore' # Git ignore file
51-
- '.*\/LICENSE' # License text
52-
- '.*\/README\.md' # Project readme
44+
# Ignoring specific file yypes
45+
- '**/*.sln' # Solution files
46+
- '**/*.csproj' # C# project files
47+
- '**/*.json' # JSON config files (e.g., appsettings)
48+
- '**/*.yml' # YAML config files (e.g., pipelines)
49+
- '**/*.png' # Image assets (e.g., Swagger diagram)
50+
51+
# Ignoring a specific folder
52+
- 'src/**/Data/**/*' # Repositories, DbContext, database files
53+
- 'src/**/Enums/**/*' # Enums like Position
54+
- 'src/**/Mappings/**/*' # AutoMapper profiles
55+
- 'src/**/Migrations/**/*' # EF Core migration artifacts
56+
- 'src/**/Models/**/*' # Domain and DTO models
57+
- 'src/**/Properties/**/*' # launchSettings.json or other system files
58+
- 'src/**/Utilities/**/*' # Static helper and extension classes
59+
- 'test' # Any file in the test folder (unit/integration/utils)
60+
61+
# Ignoring Specific Files At All Depths
62+
- '**/Program.cs' # ASP.NET Core entry point
63+
- '**/.gitignore' # Git ignore file
64+
- '**/LICENSE' # License text
65+
- '**/README.md' # Project readme

0 commit comments

Comments
 (0)