Skip to content

Commit 691865d

Browse files
committed
ci(coverage): track domain code coverage only
- Update codecov.yml to focus on Core and Configuration sources - Exclude UI, extensions, and modifiers from coverage - Adjust target thresholds and remove flags - Limit llvm-cov export to domain code in test workflow
1 parent 76c5bd2 commit 691865d

File tree

2 files changed

+17
-29
lines changed

2 files changed

+17
-29
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,17 @@ jobs:
5151
echo "Using test binary: $TEST_BINARY"
5252
echo "Using profdata: $PROFDATA"
5353
54+
# Generate coverage report for domain code only (Core + Configuration)
5455
xcrun llvm-cov export -format="lcov" \
5556
"$TEST_BINARY" \
56-
-instr-profile "$PROFDATA" > coverage.lcov
57+
-instr-profile "$PROFDATA" \
58+
Sources/InAppKit/Core/ \
59+
Sources/InAppKit/Configuration/ > coverage.lcov
5760
5861
- name: Upload Coverage to Codecov
5962
uses: codecov/codecov-action@v5
6063
with:
6164
files: ./coverage.lcov
62-
flags: domain,ui
6365
fail_ci_if_error: false
6466
token: ${{ secrets.CODECOV_TOKEN }}
6567

codecov.yml

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,34 @@ coverage:
22
status:
33
project:
44
default:
5-
target: 70%
6-
threshold: 2%
7-
# Domain code requires higher coverage
8-
domain:
9-
target: 85%
5+
# Only track domain code coverage
6+
target: 60%
107
threshold: 2%
118
paths:
129
- "Sources/InAppKit/Core/**"
1310
- "Sources/InAppKit/Configuration/**"
14-
# UI code has lower coverage requirements (SwiftUI is hard to unit test)
15-
ui:
16-
target: 30%
17-
threshold: 5%
18-
paths:
19-
- "Sources/InAppKit/UI/**"
2011
patch:
2112
default:
22-
target: 60%
23-
24-
# Coverage flags for different code areas
25-
flags:
26-
domain:
27-
paths:
28-
- Sources/InAppKit/Core/
29-
- Sources/InAppKit/Configuration/
30-
carryforward: true
31-
ui:
32-
paths:
33-
- Sources/InAppKit/UI/
34-
carryforward: true
13+
target: 50%
14+
paths:
15+
- "Sources/InAppKit/Core/**"
16+
- "Sources/InAppKit/Configuration/**"
3517

3618
comment:
3719
layout: "reach,diff,flags,tree"
3820
behavior: default
3921
require_changes: false
4022

4123
ignore:
24+
# UI code (SwiftUI views are hard to unit test)
25+
- "Sources/InAppKit/UI/**"
4226
# SwiftUI previews
4327
- "**/*Preview*.swift"
4428
# Test helpers
4529
- "**/TestHelpers/**/*"
46-
# Logger (infrastructure, not domain)
30+
# Logger (infrastructure)
4731
- "**/Logger.swift"
48-
# Platform extensions (utility code)
49-
- "**/PlatformExtensions.swift"
32+
# Extensions (utility code)
33+
- "Sources/InAppKit/Extensions/**"
34+
# Modifiers (UI-related)
35+
- "Sources/InAppKit/Modifiers/**"

0 commit comments

Comments
 (0)