Skip to content

Commit 23780f8

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Use the app artifact in E2E tests (#48469)
Summary: Pull Request resolved: #48469 This change downloads the generated artifact and uses it in the E2E tests ## Context While looking at the recent failures of the E2E tests, I realized that the Hermes, NewArch, Debug variant often fails to build, not to test, for some misconfiguration. I also realized that we are already building that varaint successfully once, so why not reuse it? To reuse prebuilds, we need a few steps: 1. make sure we build all the variants we need 2. store the .app file as an artifact 3. download the artifact and use it in the E2E tests ## Changelog: [Internal] - Build release variant for RNTester Reviewed By: mdvacca Differential Revision: D67800932 fbshipit-source-id: 6f3c8bbc42ad95cabab85dafff00e233a936d136
1 parent 9bf7aff commit 23780f8

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ runs:
4646
shell: bash
4747
if: ${{ inputs.flavor == 'Debug' }}
4848
run: |
49+
yarn install
50+
51+
# build codegen or we will see a redbox
52+
./packages/react-native-codegen/scripts/oss/build.sh
53+
4954
cd ${{ inputs.working-directory }}
5055
yarn start &
5156
sleep 5 # to give metro time to load

.github/workflows/test-all.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ jobs:
195195
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
196196
runs-on: macos-13-large
197197
needs:
198-
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
198+
[test_ios_rntester]
199199
env:
200200
HERMES_WS_DIR: /tmp/hermes
201201
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
@@ -209,21 +209,17 @@ jobs:
209209
steps:
210210
- name: Checkout
211211
uses: actions/checkout@v4
212-
- name: Run it
213-
uses: ./.github/actions/test-ios-rntester
212+
- name: Download App
213+
uses: actions/download-artifact@v4
214214
with:
215-
jsengine: ${{ matrix.jsengine }}
216-
architecture: ${{ matrix.architecture }}
217-
run-unit-tests: "false"
218-
use-frameworks: StaticLibraries
219-
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
220-
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
221-
run-e2e-tests: "true"
222-
flavor: ${{ matrix.flavor }}
215+
name: RNTesterApp-${{ matrix.architecture }}-${{ matrix.jsengine }}-${{ matrix.flavor }}
216+
path: /tmp/RNTesterBuild/RNTester.app
217+
- name: Check downloaded folder content
218+
run: ls -lR /tmp/RNTesterBuild
223219
- name: Run E2E Tests
224220
uses: ./.github/actions/maestro-ios
225221
with:
226-
app-path: "/tmp/RNTesterBuild/Build/Products/${{ matrix.flavor }}-iphonesimulator/RNTester.app"
222+
app-path: "/tmp/RNTesterBuild/RNTester.app"
227223
app-id: com.meta.RNTester.localDevelopment
228224
jsengine: ${{ matrix.jsengine }}
229225
maestro-flow: ./packages/rn-tester/.maestro/

0 commit comments

Comments
 (0)