-
Notifications
You must be signed in to change notification settings - Fork 59
81 lines (66 loc) · 2.06 KB
/
e2e.yml
File metadata and controls
81 lines (66 loc) · 2.06 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: E2E Tests
on:
push:
branches:
- main
- 'release-please--branches--main'
pull_request:
types: [opened, labeled, synchronize]
jobs:
e2e:
name: E2E (${{ matrix.browser }})
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'test:e2e')
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.59.1-noble
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
browser: [chromium, webkit]
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version-file: '.nvmrc'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Cache turbo build
uses: actions/cache@v5
with:
path: .turbo
key: ${{ runner.os }}-turbo-e2e-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-e2e-
${{ runner.os }}-turbo-
- name: Build packages
run: pnpm build:packages
- name: Build CDN bundles
run: pnpm build:cdn
- name: Build ejected skins
run: pnpm -F site ejected-skins
- name: Generate E2E test pages
run: pnpm --dir apps/e2e generate-pages
- name: Sync ejected skins to E2E app
run: pnpm --dir apps/e2e sync-ejected-skins
- name: Run E2E tests
run: pnpm --dir apps/e2e exec playwright test --project=vite-${{ matrix.browser }}
- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ matrix.browser }}
path: apps/e2e/playwright-report/
retention-days: 14
- name: Upload test traces
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-traces-${{ matrix.browser }}
path: apps/e2e/test-results/
retention-days: 7