@@ -344,17 +344,72 @@ jobs:
344344 GHOST_IMAGE_TAG : ${{ steps.load.outputs.image-tag }}
345345 run : yarn test:e2e --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
346346
347- - name : Upload Playwright artifacts
347+ - name : Upload blob report to GitHub Actions Artifacts
348348 if : failure()
349349 uses : actions/upload-artifact@v4
350350 with :
351- name : playwright-report-${{ matrix.shardIndex }}
352- path : |
353- e2e/playwright-report/
354- e2e/test-results/
351+ name : blob-report-${{ matrix.shardIndex }}
352+ path : e2e/blob-report
353+ retention-days : 1
354+
355+ - name : Upload test results artifacts
356+ if : failure()
357+ uses : actions/upload-artifact@v4
358+ with :
359+ name : test-results-${{ matrix.shardIndex }}
360+ path : e2e/test-results
361+ retention-days : 7
362+
363+ merge_reports :
364+ name : Merge Playwright Reports
365+ if : always() && needs.test_e2e.result == 'failure'
366+ needs : [test_e2e, setup]
367+ runs-on : ubuntu-latest
368+ steps :
369+ - name : Checkout
370+ uses : actions/checkout@v4
371+
372+ - uses : actions/setup-node@v4
373+ with :
374+ node-version : ${{ env.NODE_VERSION }}
375+
376+ - name : Restore caches
377+ uses : ./.github/actions/restore-cache
378+ env :
379+ DEPENDENCY_CACHE_KEY : ${{ needs.setup.outputs.dependency_cache_key }}
380+
381+ - name : Download blob reports from GitHub Actions Artifacts
382+ uses : actions/download-artifact@v4
383+ with :
384+ path : e2e/all-blob-reports
385+ pattern : blob-report-*
386+ merge-multiple : true
387+
388+ - name : Download test results from GitHub Actions Artifacts
389+ uses : actions/download-artifact@v4
390+ with :
391+ path : e2e/all-test-results
392+ pattern : test-results-*
393+ merge-multiple : true
394+
395+ - name : Merge into HTML Report
396+ run : npx playwright merge-reports --reporter html ./all-blob-reports
397+ working-directory : e2e
398+
399+ - name : Upload HTML report
400+ uses : actions/upload-artifact@v4
401+ with :
402+ name : playwright-report
403+ path : e2e/playwright-report
404+ retention-days : 14
405+
406+ - name : Upload merged test results
407+ uses : actions/upload-artifact@v4
408+ with :
409+ name : test-results
410+ path : e2e/all-test-results
355411 retention-days : 7
356412
357413 - name : Output command to view report
358- if : failure()
359414 run : |
360- echo "::notice::To view the Playwright report locally, run: gh run download ${{ github.run_id }} -n playwright-report-${{ matrix.shardIndex }} -D /tmp/playwright-\$\$ && npx playwright show-report /tmp/playwright-\$\$/playwright-report"
415+ echo "::notice::To view the Playwright report locally, run: gh run download ${{ github.run_id }} -n playwright-report -D /tmp/playwright-\$\$ && npx playwright show-report /tmp/playwright-\$\$/playwright-report"
0 commit comments