Skip to content

Commit 3bec8d5

Browse files
committed
✨ feat: enhance CI with Codecov integration
✨ feat: enhance CI with Codecov integration 🔧 CI Configuration: - Added Codecov token and verbose output to CI workflow. - Configured Codecov to fail CI if errors are encountered. - Set specific flags and name for Codecov reporting. ✨ Codecov Configuration: - Introduced a new codecov.yml file for detailed configuration. - Specified coverage requirements and thresholds for project and patch. - Configured comment layout and parser settings for better reporting. These changes significantly enhance the CI workflow by integrating Codecov for improved coverage reporting and management.
1 parent d846c42 commit 3bec8d5

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ jobs:
104104
uses: codecov/codecov-action@v3
105105
with:
106106
file: ./coverage.xml
107+
token: ${{ secrets.CODECOV_TOKEN }}
107108
fail_ci_if_error: true
109+
verbose: true
110+
flags: unittests
111+
name: codecov-umbrella
112+
override_branch: ${{ github.ref_name }}
108113

109114
build:
110115
name: Build Package

codecov.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
codecov:
2+
require_ci_to_pass: yes
3+
notify:
4+
wait_for_ci: yes
5+
6+
coverage:
7+
precision: 2
8+
round: down
9+
range: "70...100"
10+
status:
11+
project:
12+
default:
13+
target: 80% # the required coverage value
14+
threshold: 1% # the leniency in hitting the target
15+
patch:
16+
default:
17+
target: 80%
18+
threshold: 1%
19+
20+
parsers:
21+
gcov:
22+
branch_detection:
23+
conditional: yes
24+
loop: yes
25+
method: no
26+
macro: no
27+
28+
comment:
29+
layout: "reach,diff,flags,tree"
30+
behavior: default
31+
require_changes: no

0 commit comments

Comments
 (0)