Skip to content

Commit 32c24b8

Browse files
committed
Improve CodeCov scan
- add more new flags/features - range: 80..90, red below 80 - Fail if total project coverage drops by more than 0.5% - after_n_builds: 1 codecov-action@v6 no longer auto-detects how many uploads to expect. Without this, Codecov waits for more uploads that never arrive, causing the GitHub status check to stay pending until it times out. Since only one job uploads coverage (psv-linux-22-04-gcc9-build-test-codecov), setting 1 tells Codecov to process and post results immediately after that - wait_for_ci: true Ensures Codecov still waits for the CI job itself to finish before evaluating — avoids a race where Codecov processes a partial upload. Relates-To: MINOR Signed-off-by: Yaroslav Stefinko <ext-yaroslav.stefinko@here.com>
1 parent 7c1dccc commit 32c24b8

1 file changed

Lines changed: 80 additions & 29 deletions

File tree

codecov.yml

Lines changed: 80 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,99 @@
1+
# Codecov configuration for here-data-sdk-cpp
2+
# Docs: https://docs.codecov.com/docs/codecovyml-reference
3+
# CI upload: codecov/codecov-action@v6 (single upload from psv-linux-22-04-gcc9-build-test-codecov)
4+
5+
# Tell Codecov to finalise after exactly 1 upload and not wait for more.
6+
# This prevents PR status checks from hanging when only one coverage job exists.
7+
codecov:
8+
notify:
9+
after_n_builds: 1
10+
wait_for_ci: true
11+
112
coverage:
2-
range: 60..85
13+
# Visualization band: green above 90%, red below 80%
14+
range: 80..90
315
round: nearest
416
precision: 2
17+
518
status:
19+
# ── Project (overall) checks ────────────────────────────────────────────
620
project:
21+
default:
22+
# Fail if total project coverage drops by more than 0.5%
23+
threshold: 0.5%
24+
informational: false
25+
726
core:
827
paths:
928
- olp-cpp-sdk-core
10-
threshold: 1%
29+
target: 70%
30+
threshold: 0.5%
31+
1132
authentication:
1233
paths:
1334
- olp-cpp-sdk-authentication
14-
threshold: 1%
35+
target: 70%
36+
threshold: 0.5%
37+
1538
dataservice-read:
1639
paths:
1740
- olp-cpp-sdk-dataservice-read
18-
threshold: 1%
41+
target: 70%
42+
threshold: 0.5%
43+
1944
dataservice-write:
2045
paths:
2146
- olp-cpp-sdk-dataservice-write
22-
threshold: 1%
47+
target: 65%
48+
threshold: 0.5%
49+
50+
# ── Patch checks (new/changed lines in a PR must be covered) ───────────
51+
patch:
52+
default:
53+
target: 80%
54+
threshold: 5%
55+
informational: false
56+
57+
# ── PR comment behaviour ──────────────────────────────────────────────────────
58+
comment:
59+
layout: "reach,diff,flags,files"
60+
behavior: default # post once, update on new commits
61+
require_changes: true # don't comment if nothing changed
62+
require_base: true
63+
require_head: true
64+
hide_project_coverage: false
65+
66+
# ── GitHub Checks (inline PR annotations) ────────────────────────────────────
67+
github_checks:
68+
annotations: true
69+
70+
# ── Paths excluded from coverage reporting ───────────────────────────────────
2371
ignore:
24-
- olp-cpp-sdk-authentication/tests
25-
- olp-cpp-sdk-core/src/http/android
26-
- olp-cpp-sdk-core/src/http/curl
27-
- olp-cpp-sdk-core/src/http/ios
28-
- olp-cpp-sdk-core/src/http/winhttp
29-
- olp-cpp-sdk-core/src/http/Network.cpp
30-
- olp-cpp-sdk-core/tests
31-
- olp-cpp-sdk-dataservice-read/tests
32-
- olp-cpp-sdk-dataservice-write/tests
33-
- olp-cpp-sdk-dataservice-write/src/AutoFlushController.cpp
34-
- olp-cpp-sdk-dataservice-write/src/AutoFlushController.h
35-
- olp-cpp-sdk-dataservice-write/src/AutoFlushSettings.h
36-
- olp-cpp-sdk-dataservice-write/src/BackgroundTaskCollection.cpp
37-
- olp-cpp-sdk-dataservice-write/src/BackgroundTaskCollection.h
38-
- olp-cpp-sdk-dataservice-write/src/DefaultFlushEventListener.cpp
39-
- olp-cpp-sdk-dataservice-write/src/DefaultFlushEventListener.h
40-
- olp-cpp-sdk-dataservice-write/src/FlushEventListener.h
41-
- olp-cpp-sdk-dataservice-write/src/FlushMetrics.h
42-
- tests
43-
- scripts
44-
- examples
45-
- docs
46-
- external
47-
- build
72+
# Test directories for every component
73+
- "olp-cpp-sdk-authentication/tests"
74+
- "olp-cpp-sdk-core/tests"
75+
- "olp-cpp-sdk-dataservice-read/tests"
76+
- "olp-cpp-sdk-dataservice-write/tests"
77+
- "tests"
78+
79+
# Platform-specific HTTP backends (not exercised in CI coverage runs)
80+
- "olp-cpp-sdk-core/src/http/android"
81+
- "olp-cpp-sdk-core/src/http/curl"
82+
- "olp-cpp-sdk-core/src/http/ios"
83+
- "olp-cpp-sdk-core/src/http/winhttp"
84+
- "olp-cpp-sdk-core/src/http/Network.cpp"
85+
86+
# Deprecated / flush-controller files in dataservice-write
87+
- "olp-cpp-sdk-dataservice-write/src/AutoFlushController.*"
88+
- "olp-cpp-sdk-dataservice-write/src/AutoFlushSettings.h"
89+
- "olp-cpp-sdk-dataservice-write/src/BackgroundTaskCollection.*"
90+
- "olp-cpp-sdk-dataservice-write/src/DefaultFlushEventListener.*"
91+
- "olp-cpp-sdk-dataservice-write/src/FlushEventListener.h"
92+
- "olp-cpp-sdk-dataservice-write/src/FlushMetrics.h"
4893

94+
# Non-source trees
95+
- "scripts"
96+
- "examples"
97+
- "docs"
98+
- "external"
99+
- "build"

0 commit comments

Comments
 (0)