Skip to content

Commit 4944437

Browse files
chore: fix and trace the failed tests (#73)
* chore: update build script * chore(playwright): trace tests
1 parent d372c22 commit 4944437

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ jobs:
2525
- name: Run E2E tests on ${{ matrix.project }}
2626
run: npx playwright test --project ${{ matrix.project }}
2727
continue-on-error: ${{ matrix.project == 'webkit' }}
28+
- name: Upload test results
29+
if: always()
30+
uses: actions/upload-artifact@v3
31+
with:
32+
name: test-results-${{ matrix.project }}
33+
path: test-results
34+

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"scripts": {
2424
"start": "vite --host localhost --port 3000 --open",
2525
"serve": "vite --host",
26-
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 vite build --outDir build/v0.1.0",
26+
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 vite build --outDir build",
2727
"build-no-minify": "cross-env NO_MINIFY=true npm run build",
2828
"test": "jest --coverage",
2929
"eslint": "eslint src/* ",
@@ -66,4 +66,4 @@
6666
"typescript": "^5.0.2",
6767
"vite": "^4.2.1"
6868
}
69-
}
69+
}

playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ const viewportOverride: ViewportSize = {
77

88
const config: PlaywrightTestConfig = {
99
testDir: 'test-e2e',
10-
retries: 0,
10+
retries: 1,
1111
use: {
1212
headless: true,
1313
ignoreHTTPSErrors: true,
14+
trace: 'retain-on-failure',
1415
// video: 'on-first-retry',
1516
launchOptions: {
1617
// slowMo: 250,

0 commit comments

Comments
 (0)