-
Notifications
You must be signed in to change notification settings - Fork 3
144 lines (112 loc) · 3.88 KB
/
ci.yml
File metadata and controls
144 lines (112 loc) · 3.88 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v5
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check formatting
run: pnpm run format:check
- name: Lint
run: pnpm run lint
- name: Type check
run: pnpm run typecheck
- name: Run tests
run: pnpm run test:run
- name: Build
run: pnpm run build
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Playwright system dependencies
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm --filter @funstack/static exec playwright install-deps chromium
- name: Install Playwright browsers
run: pnpm --filter @funstack/static exec playwright install chromium
- name: Run e2e tests (build)
run: pnpm run test:e2e
- name: Run e2e tests (dev server)
run: pnpm run test:e2e:dev
- name: Upload Playwright report (build)
uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report-build
path: packages/static/playwright-report/
retention-days: 30
- name: Upload Playwright report (dev server)
uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report-dev
path: packages/static/playwright-report-dev/
retention-days: 30
e2e-vite7:
runs-on: ubuntu-latest
needs: ci
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v5
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "pnpm"
- name: Swap catalog to Vite 7
run: |
sed -i \
-e 's|^\( "@vitejs/plugin-react":\).*|\1 ^5.1.4|' \
-e 's|^\( vite:\).*|\1 ^7.3.1|' \
pnpm-workspace.yaml
grep -q '"@vitejs/plugin-react": \^5\.1\.4' pnpm-workspace.yaml
grep -q 'vite: \^7\.3\.1' pnpm-workspace.yaml
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Build
run: pnpm --filter @funstack/static build
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Playwright system dependencies
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm --filter @funstack/static exec playwright install-deps chromium
- name: Install Playwright browsers
run: pnpm --filter @funstack/static exec playwright install chromium
- name: Run e2e tests (build)
run: pnpm run test:e2e
- name: Run e2e tests (dev server)
run: pnpm run test:e2e:dev
- name: Upload Playwright report (build, Vite 7)
uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report-build-vite7
path: packages/static/playwright-report/
retention-days: 30
- name: Upload Playwright report (dev server, Vite 7)
uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report-dev-vite7
path: packages/static/playwright-report-dev/
retention-days: 30