Skip to content

Commit 9805ce5

Browse files
committed
Update test workflow for SwiftDICOMDecoder scheme
Changed the test workflow to use the SwiftDICOMDecoder scheme instead of DicomCore-Package. Updated coverage report generation to dynamically locate test binaries and profile data, improving compatibility and reliability.
1 parent 4bbb091 commit 9805ce5

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/tests.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ jobs:
3535
- name: Generate coverage report
3636
if: matrix.xcode == '15.4' # Only generate coverage for one Xcode version to avoid duplicates
3737
run: |
38-
xcrun llvm-cov export -format="lcov" \
39-
.build/debug/DicomCorePackageTests.xctest/Contents/MacOS/DicomCorePackageTests \
40-
-instr-profile .build/debug/codecov/default.profdata > coverage.lcov
38+
set -euo pipefail
39+
TEST_BIN=$(ls .build/*/debug/SwiftDICOMDecoderPackageTests.xctest/Contents/MacOS/SwiftDICOMDecoderPackageTests | head -n1)
40+
PROFDATA=$(ls .build/*/debug/codecov/default.profdata | head -n1)
41+
xcrun llvm-cov export -format="lcov" "$TEST_BIN" \
42+
-instr-profile "$PROFDATA" > coverage.lcov
4143
4244
- name: Upload coverage to Codecov
4345
if: matrix.xcode == '15.4'
@@ -69,20 +71,20 @@ jobs:
6971
run: sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer
7072

7173
- name: Show available simulators
72-
run: xcrun xcodebuild -showdestinations -scheme DicomCore-Package
74+
run: xcrun xcodebuild -showdestinations -scheme SwiftDICOMDecoder
7375

7476
- name: Build for iOS
7577
run: |
7678
xcodebuild build-for-testing \
77-
-scheme DicomCore-Package \
79+
-scheme SwiftDICOMDecoder \
7880
-destination "${{ matrix.destination }}" \
7981
-enableCodeCoverage YES \
8082
-derivedDataPath .build/ios
8183
8284
- name: Run iOS tests
8385
run: |
8486
xcodebuild test-without-building \
85-
-scheme DicomCore-Package \
87+
-scheme SwiftDICOMDecoder \
8688
-destination "${{ matrix.destination }}" \
8789
-enableCodeCoverage YES \
8890
-derivedDataPath .build/ios

0 commit comments

Comments
 (0)