This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
63 lines (59 loc) · 1.68 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
54
55
56
57
58
59
60
61
62
63
name: Run e2e Tests
on:
pull_request:
branches: [main]
jobs:
e2e:
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
include:
- variant: nextjs
port: 3000
- variant: react
port: 5173
- variant: vue
port: 5173
- variant: preact
port: 5173
- variant: svelte
port: 5173
- variant: vanilla
port: 5173
- variant: nuxtjs
port: 3000
- variant: astro
port: 3000
steps:
- uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/[email protected]
with:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 16
cache: "pnpm"
# Install dependencies and build CLI app
- name: Install dependencies
run: pnpm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Build Project
run: pnpm run build
# Build and run Playwright tests
- name: Build ${{ matrix.variant }}
run: cd dist && node index.js --config ../e2e/test-configs/${{ matrix.variant }}.json
- name: Test ${{ matrix.variant }}
run: npx playwright test e2e/${{ matrix.variant }}/${{ matrix.variant}}.spec.ts
env:
COMMAND: "cd dist/${{ matrix.variant }} && yarn dev"
PORT: ${{ matrix.port }}
# Upload Test Results on Failure
- uses: actions/upload-artifact@v3
if: failure()
with:
name: playwright-report
path: playwright-report/
retention-days: 30a