Shard E2E tests (#941)

This commit is contained in:
Will Chen
2025-08-14 13:48:27 -07:00
committed by GitHub
parent cc72990f0d
commit 8ef84285fc
7 changed files with 124 additions and 62 deletions

View File

@@ -1,4 +1,7 @@
import { PlaywrightTestConfig } from "@playwright/test";
import os from "os";
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
const config: PlaywrightTestConfig = {
testDir: "./e2e-tests",
@@ -12,7 +15,20 @@ const config: PlaywrightTestConfig = {
"{testDir}/{testFileDir}/snapshots/{testFileName}_{arg}{ext}",
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "html",
// Why not use GitHub reporter? Because we're using matrix and it's discouraged:
// https://playwright.dev/docs/test-reporters#github-actions-annotations
reporter: process.env.CI
? [
[
"blob",
{
// Speculatively fix https://github.com/actions/download-artifact/issues/298#issuecomment-2016075998
// by using a timestamp in the filename
outputFile: `./blob-report/report-${os.platform()}-${timestamp}.zip`,
},
],
]
: [["html"], ["line"]],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* See https://playwright.dev/docs/trace-viewer */