Skip to content

Commit a08244a

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Run E2E tests on each PR (#52197)
Summary: This Diff enables E2E tests to run on every PR. We estimated that, now that we removed JSC and the legacy arch, the cost of running E2E tests on each PR should not be that high. ## Changelog: [Internal] - Run E2E tests on each PR Reviewed By: cortinico Differential Revision: D77148473
1 parent 62d8d30 commit a08244a

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

.github/actions/build-android/action.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ inputs:
44
release-type:
55
required: true
66
description: The type of release we are building. It could be nightly, release or dry-run
7-
run-e2e-tests:
8-
default: 'false'
9-
description: If we need to build to run E2E tests. If yes, we need to build also x86.
107
gradle-cache-encryption-key:
118
description: "The encryption key needed to store the Gradle Configuration cache"
129
runs:
@@ -43,11 +40,7 @@ runs:
4340
run: |
4441
if [[ "${{ inputs.release-type }}" == "dry-run" ]]; then
4542
# dry-run: we only build ARM64 to save time/resources. For release/nightlies the default is to build all archs.
46-
if [[ "${{ inputs.run-e2e-tests }}" == 'true' ]]; then
47-
export ORG_GRADLE_PROJECT_reactNativeArchitectures="arm64-v8a,x86" # x86 is required for E2E testing
48-
else
49-
export ORG_GRADLE_PROJECT_reactNativeArchitectures="arm64-v8a"
50-
fi
43+
export ORG_GRADLE_PROJECT_reactNativeArchitectures="arm64-v8a,x86" # x86 is required for E2E testing
5144
TASKS="publishAllToMavenTempLocal build"
5245
elif [[ "${{ inputs.release-type }}" == "nightly" ]]; then
5346
# nightly: we set isSnapshot to true so artifacts are sent to the right repository on Maven Central.

.github/workflows/test-all.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: Test All
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
run-e2e-tests:
7-
description: Whether to run E2E tests or not
8-
type: boolean
9-
default: false
105
pull_request:
116
push:
127
branches:
@@ -187,7 +182,6 @@ jobs:
187182
flavor: ${{ matrix.flavor }}
188183

189184
test_e2e_ios_rntester:
190-
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
191185
runs-on: macos-14-large
192186
needs:
193187
[test_ios_rntester]
@@ -221,7 +215,6 @@ jobs:
221215
flavor: ${{ matrix.flavor }}
222216

223217
test_e2e_ios_templateapp:
224-
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
225218
runs-on: macos-14-large
226219
needs: [build_npm_package, prebuild_apple_dependencies]
227220
env:
@@ -305,7 +298,6 @@ jobs:
305298
working-directory: /tmp/RNTestProject
306299

307300
test_e2e_android_templateapp:
308-
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
309301
runs-on: 4-core-ubuntu
310302
needs: build_npm_package
311303
strategy:
@@ -424,11 +416,9 @@ jobs:
424416
uses: ./.github/actions/build-android
425417
with:
426418
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
427-
run-e2e-tests: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
428419
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
429420

430421
test_e2e_android_rntester:
431-
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
432422
runs-on: 4-core-ubuntu
433423
needs: [build_android]
434424
strategy:
@@ -626,7 +616,7 @@ jobs:
626616
rerun-failed-jobs:
627617
runs-on: ubuntu-latest
628618
needs: [test_e2e_ios_rntester, test_e2e_android_rntester, test_e2e_ios_templateapp, test_e2e_android_templateapp]
629-
if: always()
619+
if: ${{ github.ref == 'refs/heads/main' && always() }}
630620
steps:
631621
- name: Checkout
632622
uses: actions/checkout@v4

0 commit comments

Comments
 (0)