Upload Snapshots to Sentry using SnapshotPreview and SwiftSnapshotTesting libraries#780
Merged
cameroncooke merged 7 commits intomainfrom Apr 23, 2026
Merged
Upload Snapshots to Sentry using SnapshotPreview and SwiftSnapshotTesting libraries#780cameroncooke merged 7 commits intomainfrom
cameroncooke merged 7 commits intomainfrom
Conversation
📸 Snapshot Test1 modified, 43 unchanged
🛸 Powered by Emerge Tools |
📲 Install BuildsiOS
|
7502a1a to
beb2055
Compare
537b41f to
4b99f38
Compare
Sentry Snapshot Testing
|
Cameroncooke/snapshots ci branchCameroncooke/snapshots ci branch
Cameroncooke/snapshots ci branchd1159c3 to
9cf7428
Compare
9cf7428 to
bb707f6
Compare
d07af60 to
09fa151
Compare
NicoHinderling
approved these changes
Apr 22, 2026
Replace repeated environment checks with a shared AppRuntime helper and reuse it across app startup and date rendering. Remove the test-level forced snapshot recording override so recording can be controlled by the execution environment instead of hardcoded test behavior.
Drop the invokeTest override that wrapped every test in withSnapshotTesting(record: .all), which forced all snapshots to re-record and fail on each run. CI workflows should prefer setting `TEST_RUNNER_SNAPSHOT_TESTING_RECORD` to achive the same effect. This allows local tets runs to do local diffing against local snapshots and CI to record snapshots which is needed for Sentry, and where Sentry will do the image diffing.
Update the SnapshotPreviews package pin to the latest revision on main to pick up upstream changes.
Add dedicated fastlane lanes for SnapshotPreviews and Swift Snapshot Testing uploads to Sentry. Pin the newer sentry fastlane plugin version and check in the local Ruby version used for the iOS tooling setup.
Add dedicated GitHub Actions workflows for uploading SnapshotPreviews and Swift Snapshot Testing outputs to Sentry. Remove the old Sentry upload step from the Emerge snapshots workflow so each pipeline has a single responsibility.
Replace TEST_RUNNER_XCODE_RUNNING_FOR_PREVIEWS with TEST_RUNNER_EMERGE_IS_RUNNING_FOR_SNAPSHOTS in both snapshot upload jobs, using TEST_RUNNER_XCODE_RUNNING_FOR_PREVIEWS causes transparent images downstream at the render stage.
fc3bf60 to
a96d585
Compare
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 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.
Add dedicated iOS snapshot upload pipelines for Sentry.
We want snapshot artifacts from both SnapshotPreviews and Swift Snapshot Testing in Sentry without piggybacking on the existing Emerge upload job. This PR adds dedicated Fastlane lanes and GitHub Actions workflows for each snapshot source, updates the preview target devices to match the current simulator lineup, and centralizes the runtime checks used to keep snapshot output deterministic during preview and snapshot runs.
I kept the Sentry uploads as separate workflows instead of extending the Emerge pipeline further. That keeps each job single-purpose, lets the SnapshotPreviews flow build once and fan out across multiple simulators, and preserves the Swift Snapshot Testing flow as a record-and-upload path with its own wiring.
Additional review context:
Latest run
https://github.com/EmergeTools/hackernews/actions/runs/24782255032