Examples of Extracting Previews via SnapshotPreviews on github runner#751
Examples of Extracting Previews via SnapshotPreviews on github runner#751NicoHinderling wants to merge 9 commits intomainfrom
Conversation
📸 Snapshot Test2 modified, 70 unchanged
🛸 Powered by Emerge Tools |
3d32cf0 to
dc36282
Compare
| return $exit_code | ||
| } | ||
|
|
||
| collect_crash_reports() { |
There was a problem hiding this comment.
Is this still necessary now that the run is backed by xcodebuild? IIRC the generated test report file will show you where the crash occurred. The way you do it here was always pretty flaky for us so I'd rather just kill this entirely and lean on the supported methods (xcodebuild)
| return $count | ||
| } | ||
|
|
||
| extract_images() { |
There was a problem hiding this comment.
Alternatively we could add an env variable to the test runner to have it write the images to a directory. IIRC from some initial testing that was about a minute faster for our biggest user. Because when we write the images to a file ourselves that can be done async rather than blocking the main queue
| # attempt numbers, and any captured crash report filenames | ||
| # | ||
| # Potential follow-ups (not yet implemented): | ||
| # - Regex-based exclusion filtering: filter extracted PNGs by filename pattern before |
There was a problem hiding this comment.
This should all be done using the XCTest, it already supports that. In other words we don't want people to do this twice: once for this script and once for running locally. We should just standardize on the Swift way
Two examples in this:
.github/workflows/ios_sentry_upload_snapshots.yml: just the bare bones.github/workflows/ios_sentry_upload_snapshots_with_script.yml+ the new script and the config file: An attempt with Claude's help to create a crude version of a reusable script with some of the benefits we only had within the emerge backend code (see comments at top of flie in.github/scripts/ios/emerge-snapshots)