Skip to content

Commit fec8a38

Browse files
feat: integrate Codecov for test coverage monitoring
1 parent c80e693 commit fec8a38

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

.github/workflows/run-tests.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,12 @@ jobs:
2525
- name: Build project
2626
run: dotnet build --no-restore
2727

28-
- name: Run tests
29-
run: dotnet test --no-build --verbosity normal
28+
- name: Run tests with coverage
29+
run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
30+
31+
- name: Upload coverage to Codecov
32+
uses: codecov/codecov-action@v5
33+
with:
34+
token: ${{ secrets.CODECOV_TOKEN }}
35+
directory: ./coverage
36+
fail_ci_if_error: true

codecov.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: auto
6+
threshold: 2%
7+
patch:
8+
default:
9+
target: auto
10+
threshold: 2%
11+
12+
component_management:
13+
individual_components:
14+
- component_id: eftdb
15+
name: CmdScale.EntityFrameworkCore.TimescaleDB
16+
paths:
17+
- src/CmdScale.EntityFrameworkCore.TimescaleDB/**
18+
- component_id: eftdb-design
19+
name: CmdScale.EntityFrameworkCore.TimescaleDB.Design
20+
paths:
21+
- src/CmdScale.EntityFrameworkCore.TimescaleDB.Design/**
22+
23+
flag_management:
24+
individual_flags:
25+
- name: eftdb
26+
paths:
27+
- src/CmdScale.EntityFrameworkCore.TimescaleDB/**
28+
carryforward: true
29+
statuses:
30+
- type: project
31+
target: 80%
32+
- name: eftdb-design
33+
paths:
34+
- src/CmdScale.EntityFrameworkCore.TimescaleDB.Design/**
35+
carryforward: true
36+
statuses:
37+
- type: project
38+
target: 80%
39+
40+
comment:
41+
layout: "header, diff, flags, components, files"
42+
behavior: default
43+
require_changes: true
44+
45+
ignore:
46+
- "samples/**/*"
47+
- "tests/**/*"
48+
- "benchmarks/**/*"
49+
- "**/*.Designer.cs"

0 commit comments

Comments
 (0)