Skip to content

Commit 5085714

Browse files
author
Nikola Stojanovic
committed
Address AI bot remarks
1 parent af4f31b commit 5085714

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,28 @@ jobs:
5151

5252
- name: Generate Code Coverage
5353
run: |
54+
# Find the actual test executable (SPM naming can vary)
55+
TEST_EXECUTABLE=$(find .build/debug -name "*PackageTests.xctest" -type d | head -1)
56+
if [ -z "$TEST_EXECUTABLE" ]; then
57+
echo "No test executable found, skipping coverage"
58+
exit 0
59+
fi
60+
61+
EXECUTABLE_NAME=$(basename "$TEST_EXECUTABLE" .xctest)
62+
EXECUTABLE_PATH="$TEST_EXECUTABLE/Contents/MacOS/$EXECUTABLE_NAME"
63+
64+
if [ ! -f "$EXECUTABLE_PATH" ]; then
65+
echo "Test executable not found at $EXECUTABLE_PATH, skipping coverage"
66+
exit 0
67+
fi
68+
5469
xcrun llvm-cov export \
55-
.build/debug/swift-ui-debug-scanPackageTests.xctest/Contents/MacOS/swift-ui-debug-scanPackageTests \
70+
"$EXECUTABLE_PATH" \
5671
-instr-profile .build/debug/codecov/default.profdata \
5772
-format="lcov" > coverage.lcov
5873
5974
- name: Upload Code Coverage
75+
if: hashFiles('coverage.lcov') != ''
6076
uses: codecov/codecov-action@v4
6177
with:
6278
file: coverage.lcov

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
# Try to extract release notes from CHANGELOG.md if it exists
3535
if [ -f CHANGELOG.md ]; then
3636
# Extract content between the first two version headers
37-
VERSION_LINE=$(grep -n "^## \[*${{ github.ref_name }}" CHANGELOG.md | head -1 | cut -d: -f1)
37+
VERSION_LINE=$(grep -n "^## \[?${{ github.ref_name }}\]?" CHANGELOG.md | head -1 | cut -d: -f1)
3838
if [ ! -z "$VERSION_LINE" ]; then
3939
NEXT_VERSION_LINE=$(tail -n +$((VERSION_LINE + 1)) CHANGELOG.md | grep -n "^## " | head -1 | cut -d: -f1)
4040
if [ ! -z "$NEXT_VERSION_LINE" ]; then

0 commit comments

Comments
 (0)