Skip to content

Commit 565a516

Browse files
author
Jacek Radko
authored
ci(e2e): always run staging legs and fix the Playwright report path (#8766)
Fixes the staging e2e JSON report so it is actually written and uploaded: the json reporter's outputFile is resolved relative to the Playwright config dir, so the report lands in integration/playwright-report and the upload now points there. Sets TURBO_FORCE on the staging test step so the legs always execute against the live deploy instead of replaying a turbo cache hit, and declares the report as a turbo output so non-staging e2e restores it on cache hits.
1 parent 5bf43a2 commit 565a516

3 files changed

Lines changed: 37 additions & 2 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

‎.github/workflows/e2e-staging.yml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@ jobs:
277277
timeout-minutes: 25
278278
run: pnpm turbo test:integration:${{ matrix.test-name }} $TURBO_ARGS
279279
env:
280+
# Staging e2e validates the LIVE staging deploy, which is not a turbo input
281+
# (the cache key is integration/** + env). Force re-execution so a cached green
282+
# pass can't stand in for an untested deploy, and so the Playwright JSON report
283+
# is regenerated every run instead of being skipped on a `>>> FULL TURBO` hit.
284+
TURBO_FORCE: 'true'
280285
E2E_DEBUG: '1'
281286
E2E_STAGING: '1'
282287
E2E_WORKERS: '2'
@@ -301,13 +306,17 @@ jobs:
301306

302307
# Always upload the machine-readable report (even on success) so downstream
303308
# reporting/classification can run regardless of the leg's pass/fail outcome.
309+
# The json reporter's outputFile is resolved relative to the Playwright config
310+
# directory (integration/), not the repo root, so the report lands under
311+
# integration/playwright-report/. Keep that prefix here. `warn` (not `ignore`)
312+
# so a future path regression surfaces in the logs instead of failing silently.
304313
- name: Upload Playwright JSON report
305314
if: ${{ !cancelled() }}
306315
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
307316
with:
308317
name: playwright-report-${{ github.run_id }}-${{ github.run_attempt }}-${{ steps.inputs.outputs.artifact-suffix }}
309-
path: playwright-report/results.json
310-
if-no-files-found: ignore
318+
path: integration/playwright-report/results.json
319+
if-no-files-found: warn
311320
retention-days: 3
312321

313322
report:

‎turbo.json‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,36 +206,43 @@
206206
"//#test:integration:ap-flows": {
207207
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
208208
"inputs": ["integration/**"],
209+
"outputs": ["integration/playwright-report/**"],
209210
"outputLogs": "new-only"
210211
},
211212
"//#test:integration:generic": {
212213
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
213214
"inputs": ["integration/**"],
215+
"outputs": ["integration/playwright-report/**"],
214216
"outputLogs": "new-only"
215217
},
216218
"//#test:integration:express": {
217219
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
218220
"inputs": ["integration/**"],
221+
"outputs": ["integration/playwright-report/**"],
219222
"outputLogs": "new-only"
220223
},
221224
"//#test:integration:fastify": {
222225
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
223226
"inputs": ["integration/**"],
227+
"outputs": ["integration/playwright-report/**"],
224228
"outputLogs": "new-only"
225229
},
226230
"//#test:integration:hono": {
227231
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
228232
"inputs": ["integration/**"],
233+
"outputs": ["integration/playwright-report/**"],
229234
"outputLogs": "new-only"
230235
},
231236
"//#test:integration:nextjs": {
232237
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
233238
"inputs": ["integration/**"],
239+
"outputs": ["integration/playwright-report/**"],
234240
"outputLogs": "new-only"
235241
},
236242
"//#test:integration:nextjs:canary": {
237243
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
238244
"inputs": ["integration/**"],
245+
"outputs": ["integration/playwright-report/**"],
239246
"outputLogs": "new-only"
240247
},
241248
"//#test:integration:quickstart": {
@@ -248,11 +255,13 @@
248255
"VERCEL_AUTOMATION_BYPASS_SECRET"
249256
],
250257
"inputs": ["integration/**"],
258+
"outputs": ["integration/playwright-report/**"],
251259
"outputLogs": "new-only"
252260
},
253261
"//#test:integration:astro": {
254262
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
255263
"inputs": ["integration/**"],
264+
"outputs": ["integration/playwright-report/**"],
256265
"outputLogs": "new-only"
257266
},
258267
"//#test:integration:localhost": {
@@ -265,78 +274,93 @@
265274
"NODE_EXTRA_CA_CERTS"
266275
],
267276
"inputs": ["integration/**"],
277+
"outputs": ["integration/playwright-report/**"],
268278
"outputLogs": "new-only"
269279
},
270280
"//#test:integration:sessions": {
271281
"env": ["CLEANUP", "DEBUG", "DISABLE_WEB_SECURITY", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "NODE_EXTRA_CA_CERTS"],
272282
"inputs": ["integration/**"],
283+
"outputs": ["integration/playwright-report/**"],
273284
"outputLogs": "new-only"
274285
},
275286
"//#test:integration:sessions:staging": {
276287
"env": ["CLEANUP", "DEBUG", "DISABLE_WEB_SECURITY", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "NODE_EXTRA_CA_CERTS"],
277288
"inputs": ["integration/**"],
289+
"outputs": ["integration/playwright-report/**"],
278290
"outputLogs": "new-only"
279291
},
280292
"//#test:integration:handshake": {
281293
"env": ["CLEANUP", "DEBUG", "DISABLE_WEB_SECURITY", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "NODE_EXTRA_CA_CERTS"],
282294
"inputs": ["integration/**"],
295+
"outputs": ["integration/playwright-report/**"],
283296
"outputLogs": "new-only"
284297
},
285298
"//#test:integration:handshake:staging": {
286299
"env": ["CLEANUP", "DEBUG", "DISABLE_WEB_SECURITY", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "NODE_EXTRA_CA_CERTS"],
287300
"inputs": ["integration/**"],
301+
"outputs": ["integration/playwright-report/**"],
288302
"outputLogs": "new-only"
289303
},
290304
"//#test:integration:expo-web": {
291305
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
292306
"inputs": ["integration/**"],
307+
"outputs": ["integration/playwright-report/**"],
293308
"outputLogs": "new-only"
294309
},
295310
"//#test:integration:tanstack-react-start": {
296311
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
297312
"inputs": ["integration/**"],
313+
"outputs": ["integration/playwright-report/**"],
298314
"outputLogs": "new-only"
299315
},
300316
"//#test:integration:vue": {
301317
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
302318
"inputs": ["integration/**"],
319+
"outputs": ["integration/playwright-report/**"],
303320
"outputLogs": "new-only"
304321
},
305322
"//#test:integration:nuxt": {
306323
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
307324
"inputs": ["integration/**"],
325+
"outputs": ["integration/playwright-report/**"],
308326
"outputLogs": "new-only"
309327
},
310328
"//#test:integration:react-router": {
311329
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
312330
"inputs": ["integration/**"],
331+
"outputs": ["integration/playwright-report/**"],
313332
"outputLogs": "new-only"
314333
},
315334
"//#test:integration:billing": {
316335
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
317336
"inputs": ["integration/**"],
337+
"outputs": ["integration/playwright-report/**"],
318338
"outputLogs": "new-only"
319339
},
320340
"//#test:integration:machine": {
321341
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
322342
"inputs": ["integration/**"],
343+
"outputs": ["integration/playwright-report/**"],
323344
"outputLogs": "new-only"
324345
},
325346
"//#test:integration:custom": {
326347
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
327348
"inputs": ["integration/**"],
349+
"outputs": ["integration/playwright-report/**"],
328350
"outputLogs": "new-only"
329351
},
330352
"//#test:integration:cache-components": {
331353
"dependsOn": ["@clerk/nextjs#build"],
332354
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS"],
333355
"inputs": ["integration/**"],
356+
"outputs": ["integration/playwright-report/**"],
334357
"outputLogs": "new-only"
335358
},
336359
"//#test:integration:chrome-extension": {
337360
"dependsOn": ["@clerk/nextjs#build"],
338361
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
339362
"inputs": ["integration/**"],
363+
"outputs": ["integration/playwright-report/**"],
340364
"outputLogs": "new-only"
341365
},
342366
"//#typedoc:generate": {

0 commit comments

Comments
 (0)