Skip to content

Commit

Permalink
Build Release version for RNTester to speed-up E2E (facebook#48443)
Browse files Browse the repository at this point in the history
Summary:

This change makes sure we build the Release variant of RNTester so we can store the generated app as an artifact and forward it to 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

Differential Revision: D67760372
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Jan 2, 2025
1 parent 430f7d8 commit 53ad793
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/actions/test-ios-rntester/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,6 @@ runs:
- name: Build RNTester
if: ${{ inputs.run-unit-tests != 'true' && inputs.run-e2e-tests == 'false' }}
shell: bash
run: |
xcodebuild build \
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
-scheme RNTester \
-sdk iphonesimulator
- name: Build RNTester (E2E Tests)
shell: bash
if: ${{ inputs.run-e2e-tests == 'true' }}
run: |
xcodebuild \
-scheme "RNTester" \
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ jobs:
matrix:
jsengine: [Hermes, JSC]
architecture: [NewArch, OldArch]
flavor: [Debug, Release]
exclude: # We don't want to test the Old Arch in Release for E2E
- jsengine: Hermes
architecture: OldArch
flavor: Release
- jsengine: JSC
architecture: OldArch
flavor: Release
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -181,6 +189,7 @@ jobs:
use-frameworks: StaticLibraries
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: ${{ matrix.flavor }}

test_e2e_ios_rntester:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
Expand Down

0 comments on commit 53ad793

Please sign in to comment.