summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKit Langton <[email protected]>2026-04-02 15:07:46 -0400
committerGitHub <[email protected]>2026-04-02 15:07:46 -0400
commitf549fde874749d6c5c298e040064c4dde0b50546 (patch)
treeb3ae70f43c2111128c219c66d57ce8224facf894
parent6dfb30448c82725b82b5c88f9ec4390c35c52a7f (diff)
downloadopencode-f549fde874749d6c5c298e040064c4dde0b50546.tar.gz
opencode-f549fde874749d6c5c298e040064c4dde0b50546.zip
test(app): emit junit artifacts for playwright (#20732)
-rw-r--r--.github/workflows/test.yml4
-rw-r--r--packages/app/playwright.config.ts7
2 files changed, 9 insertions, 2 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 03c0741b5..803093fc5 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -105,15 +105,17 @@ jobs:
run: bun --cwd packages/app test:e2e:local
env:
CI: true
+ PLAYWRIGHT_JUNIT_OUTPUT: e2e/junit-${{ matrix.settings.name }}.xml
timeout-minutes: 30
- name: Upload Playwright artifacts
- if: failure()
+ if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-${{ matrix.settings.name }}-${{ github.run_attempt }}
if-no-files-found: ignore
retention-days: 7
path: |
+ packages/app/e2e/junit-*.xml
packages/app/e2e/test-results
packages/app/e2e/playwright-report
diff --git a/packages/app/playwright.config.ts b/packages/app/playwright.config.ts
index 2667b89a1..e9fb1cfe4 100644
--- a/packages/app/playwright.config.ts
+++ b/packages/app/playwright.config.ts
@@ -7,6 +7,11 @@ const serverPort = process.env.PLAYWRIGHT_SERVER_PORT ?? "4096"
const command = `bun run dev -- --host 0.0.0.0 --port ${port}`
const reuse = !process.env.CI
const workers = Number(process.env.PLAYWRIGHT_WORKERS ?? (process.env.CI ? 5 : 0)) || undefined
+const reporter = [["html", { outputFolder: "e2e/playwright-report", open: "never" }], ["line"]] as const
+
+if (process.env.PLAYWRIGHT_JUNIT_OUTPUT) {
+ reporter.push(["junit", { outputFile: process.env.PLAYWRIGHT_JUNIT_OUTPUT }])
+}
export default defineConfig({
testDir: "./e2e",
@@ -19,7 +24,7 @@ export default defineConfig({
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers,
- reporter: [["html", { outputFolder: "e2e/playwright-report", open: "never" }], ["line"]],
+ reporter,
webServer: {
command,
url: baseURL,