Skip to content

Commit 00eeb4d

Browse files
Abbondanzofacebook-github-bot
authored andcommitted
Shard iOS RNTester E2E tests with isolated retries (#58992)
Summary: Run the RNTester iOS suite in four independent flow shards for each of Debug and Release. Each runner owns its simulator; flows remain serial within a shard. Before every attempt, uninstall and reinstall the original app artifact, reset Keychain and app privacy permissions, and restore light appearance and portrait orientation. Retry only failed flows, continue collecting results after an exhausted flow, and retain separate reports and recordings for every attempt. Subprocess timeouts hard-kill hung commands before retry and cleanup. Allow up to ten minutes for cold simulator boot and data migration before installing the app or running flows. Remove RNTester's whole-workflow retries and use the matrix job result to propagate any shard failure. The shared action defaults keep Templateapp unsharded with its existing state behavior. Changelog: [Internal] Differential Revision: D124671885
1 parent 8566016 commit 00eeb4d

5 files changed

Lines changed: 561 additions & 153 deletions

File tree

‎.github/actions/maestro-ios/action.yml‎

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ inputs:
2626
required: false
2727
default: ''
2828
description: Maestro device OS name, such as iOS-26-2
29+
shard-index:
30+
required: false
31+
default: '0'
32+
description: Zero-based index of the flow shard to run
33+
shard-count:
34+
required: false
35+
default: '1'
36+
description: Number of flow shards
37+
reset-app:
38+
required: false
39+
default: 'false'
40+
description: Whether to reset the app before each flow attempt
2941

3042
runs:
3143
using: composite
@@ -60,6 +72,10 @@ runs:
6072
- name: Run tests
6173
id: run-tests
6274
shell: bash
75+
env:
76+
MAESTRO_SHARD_INDEX: ${{ inputs.shard-index }}
77+
MAESTRO_SHARD_COUNT: ${{ inputs.shard-count }}
78+
MAESTRO_RESET_APP: ${{ inputs.reset-app }}
6379
run: |
6480
# Avoid exit from the job if one of the command returns an error.
6581
# Maestro can fail in case of flakyness, we have some retry logic.
@@ -74,23 +90,10 @@ runs:
7490
"${{ inputs.working-directory }}" \
7591
"${{ inputs.device-model }}" \
7692
"${{ inputs.device-os }}"
77-
- name: Store video record
93+
- name: Store Maestro reports
7894
if: always()
7995
uses: ./.github/actions/upload-artifact
8096
with:
81-
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.flavor }}_NewArch
82-
overwrite: true
83-
path: |
84-
video_record_1.mov
85-
video_record_2.mov
86-
video_record_3.mov
87-
video_record_4.mov
88-
video_record_5.mov
89-
report.xml
90-
- name: Store Logs
91-
if: failure() && steps.run-tests.outcome == 'failure'
92-
uses: ./.github/actions/upload-artifact
93-
with:
94-
name: maestro-logs-${{ inputs.app-id }}-${{ inputs.flavor }}-NewArch
97+
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.flavor }}_NewArch_shard_${{ inputs.shard-index }}_attempt_${{ github.run_attempt }}
9598
overwrite: true
96-
path: /tmp/MaestroLogs
99+
path: maestro-reports

0 commit comments

Comments
 (0)