This repository was archived by the owner on Aug 21, 2025. It is now read-only.
Cache Swift packages in CI#8
Draft
mokagio wants to merge 3 commits intoainfra-786-apple-developer-configuration-for-gravatar-iosfrom
Draft
Cache Swift packages in CI#8mokagio wants to merge 3 commits intoainfra-786-apple-developer-configuration-for-gravatar-iosfrom
mokagio wants to merge 3 commits intoainfra-786-apple-developer-configuration-for-gravatar-iosfrom
Conversation
This is an arbitrary change, but I noticed that if I run the tests on my machine with iPhone 16, the Simulator fails to launch: ``` Test target AnalyticsTests encountered an error (Failed to clone device named 'iPhone 16'. (Underlying Error: The operation couldn’t be completed. Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.)) ``` I tried to run the tests via Fastlane's `scan` and it automatically picked up iPhone 16 Pro and succeeded to run the tests. When I changed the command to use iPhone 16 Pro on my end via vanilla `xcodebuild` like CI does, it worked.
This way, if a dev wants to run the same command as CI does locally, they can do so.
mokagio
commented
Jun 19, 2025
| command: | | ||
| xcodebuild test -project GravatarApp.xcodeproj -scheme GravatarApp -destination 'platform=iOS Simulator,name=iPhone 16,arch=arm64' | ||
| install_swiftpm_dependencies | ||
| make test |
Contributor
Author
There was a problem hiding this comment.
The move from calling xcodebuild here to a make task is so that if a dev wants to run the same command as CI does locally, they can do so.
mokagio
commented
Jun 19, 2025
| xed . | ||
|
|
||
| test: # Run the app unit tests | ||
| @xcodebuild test -project GravatarApp.xcodeproj -scheme GravatarApp -destination 'platform=iOS Simulator,name=iPhone 16 Pro' |
Contributor
Author
There was a problem hiding this comment.
Notice this now uses iPhone 16 Pro. This is a bit of an arbitrary change, but I noticed that if I run the tests on my machine with iPhone 16, the Simulator fails to launch:
Test target AnalyticsTests encountered an error (Failed to clone device named 'iPhone 16'. (Underlying Error: The operation couldn’t be completed. Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.))
I tried to run the tests via Fastlane's scan and it automatically picked up iPhone 16 Pro and succeeded to run the tests.
When I changed the command to use iPhone 16 Pro on my end via vanilla xcodebuild like CI does, it worked.
Contributor
|
@mokagio - I think this looks good. It's Ok to use iPhone 16 Pro. Is this PR ready? Any reason that it is still a draft? |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This should make the build a bit faster.