Skip to content

Commit 537b41f

Browse files
cameroncookeclaude
andcommitted
ci(ios): Hoist snapshot env vars to job level and boot iPad sim separately
Move TEST_RUNNER_SNAPSHOTS_EXPORT_DIR and XCODE_RUNNING_FOR_PREVIEWS into the job-level env block so both iPhone and iPad test steps share the same absolute export path. Add a dedicated boot step for the iPad simulator and clarify the existing boot step name. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent beb2055 commit 537b41f

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/ios_sentry_upload_snapshots.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ jobs:
1313
run:
1414
working-directory: ./ios
1515

16+
env:
17+
TEST_RUNNER_SNAPSHOTS_EXPORT_DIR: "${{ github.workspace }}/ios/snapshot-images"
18+
XCODE_RUNNING_FOR_PREVIEWS: 1
19+
1620
steps:
1721
- name: Checkout
1822
uses: actions/checkout@v6
@@ -37,12 +41,12 @@ jobs:
3741
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
3842
restore-keys: ${{ runner.os }}-spm-
3943

40-
- name: Boot simulator
44+
- name: Boot iPhone simulator
4145
run: xcrun simctl boot "iPhone 17 Pro Max" || true
4246

4347
- name: Generate snapshot images (iPhone)
4448
run: |
45-
set -o pipefail && TEST_RUNNER_SNAPSHOTS_EXPORT_DIR="$PWD/snapshot-images" xcodebuild test \
49+
set -o pipefail && xcodebuild test \
4650
-scheme HackerNews \
4751
-sdk iphonesimulator \
4852
-destination 'platform=iOS Simulator,name=iPhone 17 Pro Max' \
@@ -53,9 +57,12 @@ jobs:
5357
SUPPORTS_MACCATALYST=NO \
5458
| xcpretty
5559
60+
- name: Boot iPad simulator
61+
run: xcrun simctl boot "iPad Air 11-inch (M3)" || true
62+
5663
- name: Generate snapshot images (iPad)
5764
run: |
58-
set -o pipefail && TEST_RUNNER_SNAPSHOTS_EXPORT_DIR="snapshot-images/" xcodebuild test \
65+
set -o pipefail && xcodebuild test \
5966
-scheme HackerNews \
6067
-sdk iphonesimulator \
6168
-destination 'platform=iOS Simulator,name=iPad Air 11-inch (M3)' \

0 commit comments

Comments
 (0)