Skip to content

Commit aa503bd

Browse files
committed
feat: update e2e workflow
1 parent 39b813b commit aa503bd

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/test-e2e.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929

3030
- uses: ./.github/actions/setup
3131

32+
- name: Install Playwright browsers
33+
run: |
34+
cd apps/docs
35+
pnpm playwright install --with-deps chromium
36+
3237
- uses: ./.github/actions/vercel-pull
3338
with:
3439
environment: production
@@ -38,6 +43,8 @@ jobs:
3843
vercel_token: ${{ secrets.VERCEL_TOKEN }}
3944

4045
- name: Run E2E Tests
46+
env:
47+
CI: true
4148
run: |
4249
echo "Running tests for ${{ matrix.locale }} (Shard ${{ matrix.shard }}/${{ inputs.shard-total }})"
43-
pnpm --filter @next-i18n/docs test:e2e --shard ${{ matrix.shard }}/${{ inputs.shard-total }}
50+
pnpm --filter @next-i18n/docs test:e2e --shard=${{ matrix.shard }}/${{ inputs.shard-total }} --reporter=list --max-failures=10

apps/docs/playwright.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ export default defineConfig({
66
forbidOnly: !!process.env.CI,
77
retries: process.env.CI ? 2 : 0,
88
workers: process.env.CI ? 1 : undefined,
9-
reporter: 'html',
9+
reporter: process.env.CI ? [['list'], ['html']] : 'html',
1010
use: {
1111
baseURL: 'http://localhost:7878',
1212
trace: 'on-first-retry',
13+
screenshot: 'only-on-failure',
1314
},
1415
projects: [
1516
{
@@ -22,5 +23,7 @@ export default defineConfig({
2223
url: 'http://localhost:7878',
2324
reuseExistingServer: !process.env.CI,
2425
timeout: 120 * 1000,
26+
stdout: 'pipe',
27+
stderr: 'pipe',
2528
},
2629
});

0 commit comments

Comments
 (0)