Skip to content

Commit 24cfc34

Browse files
committed
improve test config
1 parent 5a93efb commit 24cfc34

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

.github/workflows/validate.yml

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
- name: ⬣ ESLint
3333
run: npm run lint
3434

35+
- name: 🧪 Run tests
36+
run: npm --prefix epicshop test
37+
3538
deploy:
3639
name: 🚀 Deploy
3740
runs-on: ubuntu-latest

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ workspace/
44
**/.cache/
55
**/build/
66
**/public/build
7-
**/playwright-report
8-
**/test-results
9-
data.db
107
/playground
118
**/tsconfig.tsbuildinfo
129

epicshop/playwright.config.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1+
import os from 'os'
2+
import path from 'path'
13
import { defineConfig, devices } from '@playwright/test'
24

35
const PORT = process.env.PORT || '5639'
6+
const tmpDir = path.join(os.tmpdir(), 'epicreact-server-components')
47

58
export default defineConfig({
6-
reporter: 'html',
9+
outputDir: path.join(tmpDir, 'playwright-test-output'),
10+
reporter: [
11+
[
12+
'html',
13+
{ open: 'never', outputFolder: path.join(tmpDir, 'playwright-report') },
14+
],
15+
],
716
use: {
817
baseURL: `http://localhost:${PORT}/`,
918
trace: 'retain-on-failure',

0 commit comments

Comments
 (0)