@@ -963,11 +963,6 @@ jobs:
963
963
- test-application : ' nextjs-app-dir'
964
964
build-command : ' test:build-13'
965
965
label : ' nextjs-app-dir (next@13)'
966
- exclude :
967
- - is_dependabot : true
968
- test-application : ' cloudflare-astro'
969
- - is_dependabot : true
970
- test-application : ' cloudflare-workers'
971
966
972
967
steps :
973
968
- name : Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
@@ -989,18 +984,26 @@ jobs:
989
984
with :
990
985
dependency_cache_key : ${{ needs.job_build.outputs.dependency_cache_key }}
991
986
987
+ - name : Determine if test app should be run
988
+ id : should-skip
989
+ if : github.event.pull_request.base.sha
990
+ run : yarn test:should-skip ${{ matrix.test-application }} --base=${{ github.event.pull_request.base.sha }} >> $GITHUB_OUTPUT
991
+ working-directory : dev-packages/e2e-tests
992
+
992
993
- name : Restore tarball cache
993
994
uses : actions/cache/restore@v4
994
995
id : restore-tarball-cache
996
+ if : steps.should-skip.outputs.SKIP != 'true'
995
997
with :
996
998
path : ${{ github.workspace }}/packages/*/*.tgz
997
999
key : ${{ env.BUILD_CACHE_TARBALL_KEY }}
998
1000
999
1001
- name : Build tarballs if not cached
1000
- if : steps.restore-tarball-cache.outputs.cache-hit != 'true'
1002
+ if : steps.restore-tarball-cache.outputs.cache-hit != 'true' && steps.should-skip.outputs.SKIP != 'true'
1001
1003
run : yarn build:tarball
1002
1004
1003
1005
- name : Install Playwright
1006
+ if : steps.should-skip.outputs.SKIP != 'true'
1004
1007
uses : ./.github/actions/install-playwright
1005
1008
with :
1006
1009
browsers : chromium
@@ -1011,42 +1014,46 @@ jobs:
1011
1014
echo "echo node=$(jq -r '.volta.node' dev-packages/e2e-tests/package.json)" >> $GITHUB_OUTPUT
1012
1015
1013
1016
- name : Validate Verdaccio
1017
+ if : steps.should-skip.outputs.SKIP != 'true'
1014
1018
run : yarn test:validate
1015
1019
working-directory : dev-packages/e2e-tests
1016
1020
1017
1021
- name : Prepare Verdaccio
1022
+ if : steps.should-skip.outputs.SKIP != 'true'
1018
1023
run : yarn test:prepare
1019
1024
working-directory : dev-packages/e2e-tests
1020
1025
env :
1021
1026
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION : ${{ steps.versions.outputs.node }}
1022
1027
1023
1028
- name : Build E2E app
1029
+ if : steps.should-skip.outputs.SKIP != 'true'
1024
1030
working-directory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1025
1031
timeout-minutes : 7
1026
1032
run : pnpm ${{ matrix.build-command || 'test:build' }}
1027
1033
1028
1034
- name : Run E2E test
1035
+ if : steps.should-skip.outputs.SKIP != 'true'
1029
1036
working-directory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1030
1037
timeout-minutes : 10
1031
1038
run : pnpm test:assert
1032
1039
1033
1040
- name : Upload Playwright Traces
1034
1041
uses : actions/upload-artifact@v4
1035
- if : failure()
1042
+ if : failure() && steps.should-skip.outputs.SKIP != 'true'
1036
1043
with :
1037
1044
name : playwright-traces-job_e2e_playwright_tests-${{ matrix.test-application}}
1038
1045
path : dev-packages/e2e-tests/test-applications/${{ matrix.test-application}}/test-results
1039
1046
overwrite : true
1040
1047
retention-days : 7
1041
1048
1042
1049
- name : Pre-process E2E Test Dumps
1043
- if : always()
1050
+ if : always() && steps.should-skip.outputs.SKIP != 'true'
1044
1051
run : |
1045
1052
node ./scripts/normalize-e2e-test-dump-transaction-events.js
1046
1053
1047
1054
- name : Upload E2E Test Event Dumps
1048
1055
uses : actions/upload-artifact@v4
1049
- if : always()
1056
+ if : always() && steps.should-skip.outputs.SKIP != 'true'
1050
1057
with :
1051
1058
name : E2E Test Dump (${{ matrix.label || matrix.test-application }})
1052
1059
path : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/event-dumps
@@ -1055,7 +1062,7 @@ jobs:
1055
1062
if-no-files-found : ignore
1056
1063
1057
1064
- name : Upload test results to Codecov
1058
- if : cancelled() == false
1065
+ if : cancelled() == false && steps.should-skip.outputs.SKIP != 'true'
1059
1066
continue-on-error : true
1060
1067
uses : codecov/test-results-action@v1
1061
1068
with :
@@ -1155,18 +1162,26 @@ jobs:
1155
1162
with :
1156
1163
dependency_cache_key : ${{ needs.job_build.outputs.dependency_cache_key }}
1157
1164
1165
+ - name : Determine if test app should be run
1166
+ id : should-skip
1167
+ if : github.event.pull_request.base.sha
1168
+ run : yarn test:should-skip ${{ matrix.test-application }} --base=${{ github.event.pull_request.base.sha }} >> $GITHUB_OUTPUT
1169
+ working-directory : dev-packages/e2e-tests
1170
+
1158
1171
- name : Restore tarball cache
1172
+ if : steps.should-skip.outputs.SKIP != 'true'
1159
1173
uses : actions/cache/restore@v4
1160
1174
id : restore-tarball-cache
1161
1175
with :
1162
1176
path : ${{ github.workspace }}/packages/*/*.tgz
1163
1177
key : ${{ env.BUILD_CACHE_TARBALL_KEY }}
1164
1178
1165
1179
- name : Build tarballs if not cached
1166
- if : steps.restore-tarball-cache.outputs.cache-hit != 'true'
1180
+ if : steps.restore-tarball-cache.outputs.cache-hit != 'true' && steps.should-skip.outputs.SKIP != 'true'
1167
1181
run : yarn build:tarball
1168
1182
1169
1183
- name : Install Playwright
1184
+ if : steps.should-skip.outputs.SKIP != 'true'
1170
1185
uses : ./.github/actions/install-playwright
1171
1186
with :
1172
1187
browsers : chromium
@@ -1177,33 +1192,37 @@ jobs:
1177
1192
echo "echo node=$(jq -r '.volta.node' dev-packages/e2e-tests/package.json)" >> $GITHUB_OUTPUT
1178
1193
1179
1194
- name : Validate Verdaccio
1195
+ if : steps.should-skip.outputs.SKIP != 'true'
1180
1196
run : yarn test:validate
1181
1197
working-directory : dev-packages/e2e-tests
1182
1198
1183
1199
- name : Prepare Verdaccio
1200
+ if : steps.should-skip.outputs.SKIP != 'true'
1184
1201
run : yarn test:prepare
1185
1202
working-directory : dev-packages/e2e-tests
1186
1203
env :
1187
1204
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION : ${{ steps.versions.outputs.node }}
1188
1205
1189
1206
- name : Build E2E app
1207
+ if : steps.should-skip.outputs.SKIP != 'true'
1190
1208
working-directory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1191
1209
timeout-minutes : 7
1192
1210
run : pnpm ${{ matrix.build-command || 'test:build' }}
1193
1211
1194
1212
- name : Run E2E test
1213
+ if : steps.should-skip.outputs.SKIP != 'true'
1195
1214
working-directory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1196
1215
timeout-minutes : 10
1197
1216
run : pnpm ${{ matrix.assert-command || 'test:assert' }}
1198
1217
1199
1218
- name : Pre-process E2E Test Dumps
1200
- if : always()
1219
+ if : always() && steps.should-skip.outputs.SKIP != 'true'
1201
1220
run : |
1202
1221
node ./scripts/normalize-e2e-test-dump-transaction-events.js
1203
1222
1204
1223
- name : Upload E2E Test Event Dumps
1205
1224
uses : actions/upload-artifact@v4
1206
- if : always()
1225
+ if : always() && steps.should-skip.outputs.SKIP != 'true'
1207
1226
with :
1208
1227
name : E2E Test Dump (${{ matrix.label || matrix.test-application }})
1209
1228
path : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/event-dumps
@@ -1213,7 +1232,7 @@ jobs:
1213
1232
1214
1233
- name : Deploy Astro to Cloudflare
1215
1234
uses : cloudflare/pages-action@v1
1216
- if : matrix.test-application == 'cloudflare-astro'
1235
+ if : matrix.test-application == 'cloudflare-astro' && steps.should-skip.outputs.SKIP != 'true'
1217
1236
with :
1218
1237
apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
1219
1238
accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
0 commit comments