Skip to content

Modern Docker Management, Designed for Everyone

chore: upload playwright to depot

Kyle Mendellbfe7bd499972
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 05b7fe231..8ed0185fd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -291,10 +291,11 @@ jobs:
run: just deps install tests
- name: Run Playwright E2E tests
- run: pnpm -C tests exec playwright test --project=chromium
+ run: mkdir -p tests/test-results && pnpm -C tests exec playwright test --project=chromium
env:
COMPOSE_FILE: ${{ matrix.database.compose_file }}
BASE_URL: http://localhost:${{ matrix.database.port }}
+ PLAYWRIGHT_JUNIT_OUTPUT_FILE: test-results/playwright-${{ matrix.database.name }}.xml
- name: Upload Playwright HTML report
if: always()
@@ -305,6 +306,12 @@ jobs:
include-hidden-files: true
retention-days: 15
+ - name: Report Playwright test results to Depot
+ if: ${{ !cancelled() }}
+ uses: depot/test-report-action@v1
+ with:
+ path: tests/test-results/
+
cli-e2e-tests:
name: CLI E2E Tests (proxy)
if: ${{ github.head_ref != 'l10n_crowdin' }}
@@ -344,11 +351,12 @@ jobs:
run: pnpm -C tests install
- name: Run CLI E2E tests against socket proxy
- run: pnpm -C tests exec playwright test --project=cli
+ run: mkdir -p tests/test-results && pnpm -C tests exec playwright test --project=cli
env:
COMPOSE_FILE: setup/compose-proxy.yaml
BASE_URL: http://localhost:3002
E2E_ADMIN_STATIC_API_KEY: ${{ secrets.E2E_ADMIN_STATIC_API_KEY }}
+ PLAYWRIGHT_JUNIT_OUTPUT_FILE: test-results/playwright-cli.xml
- name: Upload Playwright HTML report
if: always()
@@ -358,3 +366,9 @@ jobs:
path: tests/.report
include-hidden-files: true
retention-days: 15
+
+ - name: Report Playwright test results to Depot
+ if: ${{ !cancelled() }}
+ uses: depot/test-report-action@v1
+ with:
+ path: tests/test-results/
diff --git a/tests/playwright.config.ts b/tests/playwright.config.ts
index 95029b210..89b2b8225 100644
--- a/tests/playwright.config.ts
+++ b/tests/playwright.config.ts
@@ -1,6 +1,7 @@
import { defineConfig, devices } from '@playwright/test';
const baseURL = process.env.BASE_URL || 'http://localhost:3000';
+const ciJunitOutputFile = process.env.PLAYWRIGHT_JUNIT_OUTPUT_FILE || 'test-results/junit.xml';
export default defineConfig({
testDir: '.',
@@ -11,7 +12,18 @@ export default defineConfig({
globalSetup: './setup/global-setup',
globalTeardown: './setup/global-teardown',
reporter: process.env.CI
- ? [['html', { outputFolder: '.report' }], ['github']]
+ ? [
+ ['html', { outputFolder: '.report' }],
+ ['github'],
+ [
+ 'junit',
+ {
+ outputFile: ciJunitOutputFile,
+ includeProjectInTestName: true,
+ stripANSIControlSequences: true
+ }
+ ]
+ ]
: [['line'], ['html', { open: 'never', outputFolder: '.report' }]],
use: {
baseURL,