@@ -671,22 +671,42 @@ jobs:
671671 uses : actions/setup-node@v7
672672 with :
673673 node-version-file : ' package.json'
674- - name : Restore caches
675- uses : ./.github/ actions/restore-cache
674+ - name : Restore build artifacts
675+ uses : actions/download-artifact@v8
676676 with :
677- dependency_cache_key : ${{ needs.job_build.outputs.dependency_cache_key }}
677+ name : build-output
678678
679679 - name : Restore build bundle artifacts
680680 uses : actions/download-artifact@v8
681681 with :
682682 name : build-bundle-output
683683 path : ${{ env.BUNDLE_ARTIFACT_DOWNLOAD_PATH }}
684684
685- - name : Install Playwright
685+ # Started after the artifact downloads: starting next to them made `download-artifact` fail to read the event file.
686+ - name : Install Playwright browsers
687+ id : install-playwright-browsers
688+ background : true
689+ uses : ./.github/actions/install-playwright
690+ with :
691+ cwd : dev-packages/browser-integration-tests
692+ part : browsers
693+
694+ - name : Install Playwright system dependencies
695+ id : install-playwright-deps
696+ background : true
686697 uses : ./.github/actions/install-playwright
687698 with :
688699 browsers : ${{ matrix.project }}
689700 cwd : dev-packages/browser-integration-tests
701+ part : system-deps
702+
703+ - name : Restore caches
704+ uses : ./.github/actions/restore-cache
705+ with :
706+ dependency_cache_key : ${{ needs.job_build.outputs.dependency_cache_key }}
707+ restore-build-output : ' false'
708+
709+ - wait : [install-playwright-browsers, install-playwright-deps]
690710
691711 - name : Run Playwright tests
692712 env :
@@ -734,22 +754,42 @@ jobs:
734754 uses : actions/setup-node@v7
735755 with :
736756 node-version-file : ' package.json'
737- - name : Restore caches
738- uses : ./.github/ actions/restore-cache
757+ - name : Restore build artifacts
758+ uses : actions/download-artifact@v8
739759 with :
740- dependency_cache_key : ${{ needs.job_build.outputs.dependency_cache_key }}
760+ name : build-output
741761
742762 - name : Restore build bundle artifacts
743763 uses : actions/download-artifact@v8
744764 with :
745765 name : build-bundle-output
746766 path : ${{ env.BUNDLE_ARTIFACT_DOWNLOAD_PATH }}
747767
748- - name : Install Playwright
768+ # Started after the artifact downloads: starting next to them made `download-artifact` fail to read the event file.
769+ - name : Install Playwright browsers
770+ id : install-playwright-browsers
771+ background : true
772+ uses : ./.github/actions/install-playwright
773+ with :
774+ cwd : dev-packages/browser-integration-tests
775+ part : browsers
776+
777+ - name : Install Playwright system dependencies
778+ id : install-playwright-deps
779+ background : true
749780 uses : ./.github/actions/install-playwright
750781 with :
751782 browsers : chromium
752783 cwd : dev-packages/browser-integration-tests
784+ part : system-deps
785+
786+ - name : Restore caches
787+ uses : ./.github/actions/restore-cache
788+ with :
789+ dependency_cache_key : ${{ needs.job_build.outputs.dependency_cache_key }}
790+ restore-build-output : ' false'
791+
792+ - wait : [install-playwright-browsers, install-playwright-deps]
753793
754794 - name : Run Playwright Loader tests
755795 env :
@@ -1068,31 +1108,6 @@ jobs:
10681108 uses : actions/checkout@v7
10691109 with :
10701110 ref : ${{ env.HEAD_COMMIT }}
1071- - name : Set up Node
1072- uses : actions/setup-node@v7
1073- with :
1074- node-version-file : ' dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json'
1075- - name : Set up Bun
1076- if :
1077- matrix.test-application == 'node-exports-test-app' || contains(matrix.test-application, 'bun') ||
1078- matrix.runtime == 'bun'
1079- uses : oven-sh/setup-bun@v2
1080- with :
1081- bun-version : ' 1.3.14'
1082- - name : Set up AWS SAM
1083- if : matrix.test-application == 'aws-serverless' || matrix.test-application == 'aws-serverless-layer'
1084- uses : aws-actions/setup-sam@v3
1085- with :
1086- use-installer : true
1087- token : ${{ secrets.GITHUB_TOKEN }}
1088- - name : Set up Deno
1089- if : contains(matrix.test-application, 'deno') || matrix.runtime == 'deno'
1090- uses : denoland/setup-deno@v2.0.5
1091- with :
1092- deno-version : ${{ matrix.deno-version || 'v2.8.3' }}
1093- - name : Install pnpm
1094- uses : ./.github/actions/install-pnpm
1095-
10961111 - name : Restore tarball artifacts
10971112 uses : actions/download-artifact@v8
10981113 with :
@@ -1119,15 +1134,49 @@ jobs:
11191134 with :
11201135 name : build-output
11211136
1122- # Installs Playwright while the app builds.
1137+ # Installs Playwright while the job sets up and the app builds.
11231138 # Started after the artifact downloads: starting next to them made `download-artifact` fail to read the event file.
1124- - name : Install Playwright
1125- id : install-playwright
1139+ - name : Install Playwright browsers
1140+ id : install-playwright-browsers
1141+ background : true
1142+ uses : ./.github/actions/install-playwright
1143+ with :
1144+ cwd : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1145+ part : browsers
1146+
1147+ - name : Install Playwright system dependencies
1148+ id : install-playwright-deps
11261149 background : true
11271150 uses : ./.github/actions/install-playwright
11281151 with :
11291152 browsers : chromium
11301153 cwd : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1154+ part : system-deps
1155+
1156+ - name : Install pnpm
1157+ uses : ./.github/actions/install-pnpm
1158+ - name : Set up Node
1159+ uses : actions/setup-node@v7
1160+ with :
1161+ node-version-file : ' dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json'
1162+ - name : Set up Bun
1163+ if :
1164+ matrix.test-application == 'node-exports-test-app' || contains(matrix.test-application, 'bun') ||
1165+ matrix.runtime == 'bun'
1166+ uses : oven-sh/setup-bun@v2
1167+ with :
1168+ bun-version : ' 1.3.14'
1169+ - name : Set up AWS SAM
1170+ if : matrix.test-application == 'aws-serverless' || matrix.test-application == 'aws-serverless-layer'
1171+ uses : aws-actions/setup-sam@v3
1172+ with :
1173+ use-installer : true
1174+ token : ${{ secrets.GITHUB_TOKEN }}
1175+ - name : Set up Deno
1176+ if : contains(matrix.test-application, 'deno') || matrix.runtime == 'deno'
1177+ uses : denoland/setup-deno@v2.0.5
1178+ with :
1179+ deno-version : ${{ matrix.deno-version || 'v2.8.3' }}
11311180
11321181 - name : Prepare e2e tests
11331182 run : yarn test:prepare
@@ -1154,7 +1203,7 @@ jobs:
11541203 env :
11551204 SENTRY_E2E_WORKSPACE_ROOT : ${{ github.workspace }}
11561205
1157- - wait : [install-playwright]
1206+ - wait : [install-playwright-browsers, install-playwright-deps ]
11581207
11591208 - name : Run E2E test
11601209 working-directory : ${{ runner.temp }}/test-application
@@ -1213,25 +1262,6 @@ jobs:
12131262 uses : actions/checkout@v7
12141263 with :
12151264 ref : ${{ env.HEAD_COMMIT }}
1216- - name : Set up Node
1217- uses : actions/setup-node@v7
1218- with :
1219- node-version-file : ' dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json'
1220- - name : Set up Bun
1221- if :
1222- matrix.test-application == 'node-exports-test-app' || contains(matrix.test-application, 'bun') ||
1223- matrix.runtime == 'bun'
1224- uses : oven-sh/setup-bun@v2
1225- with :
1226- bun-version : ' 1.3.14'
1227- - name : Set up Deno
1228- if : contains(matrix.test-application, 'deno') || matrix.runtime == 'deno'
1229- uses : denoland/setup-deno@v2.0.5
1230- with :
1231- deno-version : ${{ matrix.deno-version || 'v2.8.3' }}
1232- - name : Install pnpm
1233- uses : ./.github/actions/install-pnpm
1234-
12351265 - name : Restore tarball artifacts
12361266 uses : actions/download-artifact@v8
12371267 with :
@@ -1244,15 +1274,43 @@ jobs:
12441274 name : build-test-utils-tarball-output
12451275 path : dev-packages/test-utils
12461276
1247- # Installs Playwright while the app builds.
1277+ # Installs Playwright while the job sets up and the app builds.
12481278 # Started after the artifact downloads: starting next to them made `download-artifact` fail to read the event file.
1249- - name : Install Playwright
1250- id : install-playwright
1279+ - name : Install Playwright browsers
1280+ id : install-playwright-browsers
1281+ background : true
1282+ uses : ./.github/actions/install-playwright
1283+ with :
1284+ cwd : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1285+ part : browsers
1286+
1287+ - name : Install Playwright system dependencies
1288+ id : install-playwright-deps
12511289 background : true
12521290 uses : ./.github/actions/install-playwright
12531291 with :
12541292 browsers : chromium
12551293 cwd : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1294+ part : system-deps
1295+
1296+ - name : Install pnpm
1297+ uses : ./.github/actions/install-pnpm
1298+ - name : Set up Node
1299+ uses : actions/setup-node@v7
1300+ with :
1301+ node-version-file : ' dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json'
1302+ - name : Set up Bun
1303+ if :
1304+ matrix.test-application == 'node-exports-test-app' || contains(matrix.test-application, 'bun') ||
1305+ matrix.runtime == 'bun'
1306+ uses : oven-sh/setup-bun@v2
1307+ with :
1308+ bun-version : ' 1.3.14'
1309+ - name : Set up Deno
1310+ if : contains(matrix.test-application, 'deno') || matrix.runtime == 'deno'
1311+ uses : denoland/setup-deno@v2.0.5
1312+ with :
1313+ deno-version : ${{ matrix.deno-version || 'v2.8.3' }}
12561314
12571315 - name : Prepare E2E tests
12581316 run : yarn test:prepare
@@ -1277,7 +1335,7 @@ jobs:
12771335 timeout-minutes : 7
12781336 run : ${{ matrix.build-command || 'pnpm test:build' }}
12791337
1280- - wait : [install-playwright]
1338+ - wait : [install-playwright-browsers, install-playwright-deps ]
12811339
12821340 - name : Run E2E test
12831341 working-directory : ${{ runner.temp }}/test-application
0 commit comments