Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ steps:

- label: "🧪 Tests"
key: tests
plugins: [$CI_TOOLKIT]
command: |
xcodebuild test -project GravatarApp.xcodeproj -scheme GravatarApp -destination 'platform=iOS Simulator,name=iPhone 16,arch=arm64'
install_swiftpm_dependencies
make test
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

notify:
- github_commit_status:
context: "Unit tests"
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ help: # Display this help.
dev: # Open the package in xcode
xed .

test: # Run the app unit tests
@xcodebuild test -project GravatarApp.xcodeproj -scheme GravatarApp -destination 'platform=iOS Simulator,name=iPhone 16 Pro'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


swiftformat: check-docker # Automatically find and fixes lint issues
@docker run --rm -v $(shell pwd):$(shell pwd) -w $(shell pwd) ghcr.io/nicklockwood/swiftformat:$(SWIFTFORMAT_VERSION) GravatarApp GravatarAppTests Packages

Expand Down