Skip to content

Conversation

@oleksiikolomiietssnapp
Copy link
Collaborator

No description provided.

- Add platform detection step after Swift version verification
- Parse Package.swift using 'swift package dump-package'
- Extract platform names and log them for visibility
- Default to macOS if no platforms specified or parsing fails
- No behavioral changes: still runs macOS tests only (multi-platform testing in Phase 2)
- Outputs detected platforms to GITHUB_OUTPUT for future use
- Add conditional logic to test execution based on detected platform
- If iOS detected: run xcodebuild with iOS Simulator (iPhone 15)
- If macOS only: run existing swift test approach
- Add xcresult to SPM JSON coverage format conversion using xccov
- Automatically create, boot, test, and cleanup iOS simulators
- Handle both SPM coverage (macOS) and xcodebuild coverage (iOS) formats
- Use project name as scheme for xcodebuild testing

This enables MediaBridge and other iOS packages to run tests correctly.
- Refactor test execution to loop through ALL detected platforms
- Support for: macOS, iOS, tvOS, watchOS, visionOS
- Each platform runs in sequence:
  * macOS → swift test (SPM)
  * iOS → xcodebuild with iPhone 15 simulator
  * tvOS → xcodebuild with Apple TV simulator
  * watchOS → xcodebuild with Apple Watch simulator
  * visionOS → xcodebuild with Apple Vision Pro simulator (uses xrOS runtime)
- Store coverage paths from all platforms in temp file
- Merge all platform coverage data into single SPM-format JSON
- Continue testing other platforms if one fails
- Track failed platforms and report at end
- Clean up duplicate code from previous implementation

For MediaBridge (ios + visionos platforms):
- Iteration 1: Run iOS tests → collect coverage
- Iteration 2: Run visionOS tests → collect coverage
- Merge coverage from both platforms → generate report
- Skip tvOS, watchOS, visionOS platforms with informative message
- These platforms are detected but not tested due to:
  * Limited simulator availability on GitHub runners
  * Complexity of setting up simulators
  * iOS and macOS cover the majority of use cases
- Removed ~150 lines of tvOS/watchOS/visionOS simulator code
- Clear messaging when platforms are skipped

For MediaBridge (ios + visionos):
- iOS: Will run tests with simulator ✅
- visionOS: Will be skipped with clear message ⏭️
- Coverage report will show only iOS results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants