-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/platform detection #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
oleksiikolomiietssnapp
wants to merge
26
commits into
main
Choose a base branch
from
feature/platform-detection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.