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