Skip to content

Commit 1236852

Browse files
authored
Fail iOS RNTester E2E straight away when the app artifact is missing
**Stack** (iOS RNTester E2E cost, review bottom-up): 1. #59635 2. #59636 3. #59637 4. #59638 5. #59640 6. #59641 ← this PR 7. #59642 ## Summary: Part 6 of the iOS E2E cost stack. `test_e2e_ios_rntester` only checks that `test_ios_rntester` succeeded, but `test_ios_rntester` uses `continue-on-error`, so it reports success even when the leg that uploads `RNTesterApp-NewArch-<flavor>` failed (the upload is its last step). In run 40709683649 the Release app was never uploaded and the E2E job still started, and retried, three times. Download the app as the first step after checkout, and treat a missing app as a non-retryable failure with an error that points to the build job, instead of an incomplete run that triggers the workflow retries. Gating in `test-all.yml` on the artifact itself would need `actions: read` to list artifacts, which the reusable workflow can't get under Test All's `contents: read`. ## Changelog: [INTERNAL] [CHANGED] - Fail iOS RNTester E2E straight away when the app artifact is missing ## Test Plan: - `actionlint` reports no new issues. - The missing-artifact path matches run 40709683649: `download-artifact` fails after its 3 attempts, the job is classified `failed`, and the run fails without workflow retries. Differential Revision: D128581762 Pull Request resolved: #59641
1 parent a979602 commit 1236852

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

‎.github/workflows/e2e-ios-rntester.yml‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ jobs:
5252
SHOULD_RUN=false
5353
fi
5454
echo "should-run=$SHOULD_RUN" >> "$GITHUB_OUTPUT"
55-
- name: Setup Node.js
56-
if: steps.test-state.outputs.should-run == 'true'
57-
uses: ./.github/actions/setup-node
55+
# First, so that a missing app fails the job before any other setup.
5856
- name: Download App
57+
id: download-app
5958
if: steps.test-state.outputs.should-run == 'true'
6059
uses: ./.github/actions/download-artifact
6160
with:
@@ -64,6 +63,9 @@ jobs:
6463
- name: Check downloaded folder content
6564
if: steps.test-state.outputs.should-run == 'true'
6665
run: ls -lR /tmp/RNTesterBuild
66+
- name: Setup Node.js
67+
if: steps.test-state.outputs.should-run == 'true'
68+
uses: ./.github/actions/setup-node
6769
- name: Run E2E Tests
6870
id: run-tests
6971
if: steps.test-state.outputs.should-run == 'true'
@@ -95,14 +97,19 @@ jobs:
9597
if: always()
9698
shell: bash
9799
# passed: every flow passed.
98-
# failed: a flow failed all of its attempts; retrying the job would only
99-
# repeat the same failure.
100+
# failed: a flow failed all of its attempts, or the app to test is
101+
# missing; retrying the job would only repeat the same failure.
100102
# incomplete: the job stopped before running every flow (runner or
101103
# setup failure); a retry can pick up the remaining flows.
102104
run: |
103105
STATE=/tmp/maestro-ios-state/results.json
104106
if [[ "${{ steps.test-state.outputs.should-run }}" == "false" || "${{ steps.run-tests.outcome }}" == "success" ]]; then
105107
RESULT=passed
108+
elif [[ "${{ steps.download-app.outcome }}" == "failure" ]]; then
109+
# test_ios_rntester uses continue-on-error, so it reports success
110+
# even when the build that uploads this app failed.
111+
echo "::error::RNTesterApp-NewArch-${{ matrix.flavor }} is missing. Check the test_ios_rntester (${{ matrix.flavor }}, frameworks: false) job."
112+
RESULT=failed
106113
elif [[ -f "$STATE" ]] && jq -e 'any(.flows[]; .status == "failed")' "$STATE" > /dev/null; then
107114
RESULT=failed
108115
else

0 commit comments

Comments
 (0)