Skip to content

Commit aded253

Browse files
authored
test(e2e): Run required E2E tests on PRs from forks (#12791)
Enable running E2E tests on PRs opened from forked repositories. Previously we excluded these because some E2E tests required secrets which are not available in the forks, causing e2e test runs to always fail. Now that we separated these tests from the e2e tests that don't require secrets (#12259) we should be good to re-enable the required e2e tests for external PRs.
1 parent 2e3ae56 commit aded253

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -913,8 +913,7 @@ jobs:
913913
# - AND if the profiling node bindings were either successful or skipped
914914
if: |
915915
always() && needs.job_build.result == 'success' &&
916-
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped') &&
917-
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
916+
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped')
918917
needs: [job_get_metadata, job_build, job_compile_bindings_profiling_node]
919918
runs-on: ubuntu-20.04-large-js
920919
timeout-minutes: 15
@@ -996,7 +995,6 @@ jobs:
996995
'angular-17',
997996
'angular-18',
998997
'aws-lambda-layer-cjs',
999-
'cloudflare-astro',
1000998
'node-express',
1001999
'create-react-app',
10021000
'create-next-app',
@@ -1114,16 +1112,6 @@ jobs:
11141112
timeout-minutes: 5
11151113
run: pnpm test:assert
11161114

1117-
- name: Deploy Astro to Cloudflare
1118-
uses: cloudflare/pages-action@v1
1119-
if: matrix.test-application == 'cloudflare-astro'
1120-
with:
1121-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
1122-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
1123-
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
1124-
directory: dist
1125-
workingDirectory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1126-
11271115
job_optional_e2e_tests:
11281116
name: E2E ${{ matrix.label || matrix.test-application }} Test
11291117
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
@@ -1149,6 +1137,7 @@ jobs:
11491137
matrix:
11501138
test-application:
11511139
[
1140+
'cloudflare-astro',
11521141
'react-send-to-sentry',
11531142
'node-express-send-to-sentry',
11541143
'debug-id-sourcemaps',
@@ -1215,6 +1204,16 @@ jobs:
12151204
timeout-minutes: 5
12161205
run: pnpm ${{ matrix.assert-command || 'test:assert' }}
12171206

1207+
- name: Deploy Astro to Cloudflare
1208+
uses: cloudflare/pages-action@v1
1209+
if: matrix.test-application == 'cloudflare-astro'
1210+
with:
1211+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
1212+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
1213+
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
1214+
directory: dist
1215+
workingDirectory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1216+
12181217
job_profiling_e2e_tests:
12191218
name: E2E ${{ matrix.label || matrix.test-application }} Test
12201219
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks

0 commit comments

Comments
 (0)