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