-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.22 KB
/
playwright.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Playwright CI
permissions: {}
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
name: E2E Tests with Playwright
timeout-minutes: 60
runs-on: ubuntu-latest
permissions:
contents: read
attestations: write
strategy:
matrix:
node-version: [ 20.x, 22.x ]
steps:
- uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Create .env file
run: echo "DATABASE_URL=\"file:./test.db\"" > .env
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Execute Prisma migrations
run: pnpm exec prisma migrate deploy
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report-node-${{ matrix.node-version }}
path: playwright-report/
retention-days: 30