-
Notifications
You must be signed in to change notification settings - Fork 58
265 lines (225 loc) · 7.26 KB
/
playwright.yml
File metadata and controls
265 lines (225 loc) · 7.26 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
name: Browser Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test-esm-example:
defaults:
run:
working-directory: ./examples/esm
timeout-minutes: 60
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v6
with:
node-version: lts/*
- name: Install dependencies
run: npm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run test
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
test-vite-example:
defaults:
run:
working-directory: ./examples/vite
timeout-minutes: 60
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v6
with:
node-version: lts/*
- name: Install dependencies
run: npm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run test
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
test-webpack-example:
defaults:
run:
working-directory: ./examples/webpack
timeout-minutes: 60
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v6
with:
node-version: lts/*
- name: Install dependencies
run: npm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run test
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
test-itk-wasm:
name: itk-wasm browser tests
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
large-packages: false
tool-cache: true
- name: Pull latest Docker images
run: |
./src/docker/pull.sh --no-debug
- name: Install
uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: pnpm
- name: Install dependencies for itk-wasm
run: pnpm install
working-directory: packages/core/typescript/itk-wasm
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
working-directory: packages/core/typescript/itk-wasm
- name: Build itk-wasm
run: |
pnpm run --aggregate-output --filter itk-wasm build
- name: Build @itk-wasm/demo-app
run: |
pnpm run --aggregate-output --filter '@itk-wasm/demo-app' build
- name: Build build:gen:typescript
run: |
pnpm run --aggregate-output build:gen:typescript
- name: Build itk-wasm
run: |
pnpm run --aggregate-output --filter itk-wasm build
# Test deps
pnpm run --aggregate-output --filter "@itk-wasm/demo-app" build
pnpm run --aggregate-output --filter "@itk-wasm/mesh-io" build
pnpm run --aggregate-output --filter "@itk-wasm/transform-io" build
pnpm run --aggregate-output --filter "@itk-wasm/image-io" build
- name: Run Playwright tests
working-directory: ./packages/core/typescript/itk-wasm
run: pnpm run test:browser
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report-itk-wasm
path: packages/core/typescript/itk-wasm/playwright-report/
retention-days: 30
test-packages:
name: browser tests
runs-on: ubuntu-24.04
strategy:
max-parallel: 3
matrix:
package: [compare-images, compare-meshes, compress-stringify, dicom, downsample, image-io, mesh-io, transform-io]
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
large-packages: false
tool-cache: true
- uses: nick-fields/retry@v3
name: Pull latest Docker images
with:
max_attempts: 5
timeout_minutes: 10
command: ./src/docker/pull.sh --no-debug
- name: Install
uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: pnpm
- name: pnpm install
run: pnpm install --frozen-lockfile
- name: Build itk-wasm
run: |
pnpm run --aggregate-output --filter itk-wasm build
- name: Build @itk-wasm/demo-app
run: |
pnpm run --aggregate-output --filter '@itk-wasm/demo-app' build
- name: Build build:gen:typescript
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build..." build:gen:typescript
- name: Build typescript
run: |
pnpm install
# Build the generated TypeScript package
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}..." build:tsc
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}" build
- name: Download test data
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" test:data:download
- name: Install Playwright Browsers
working-directory: packages/${{ matrix.package }}/typescript
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
working-directory: packages/${{ matrix.package }}/typescript
run: pnpm run test:browser
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report-${{ matrix.package }}
path: packages/${{ matrix.package }}/typescript/playwright-report/
retention-days: 30
test-hello-world-example:
defaults:
run:
working-directory: ./examples/hello-world
timeout-minutes: 60
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6.0.2
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
- name: Pull latest Docker images
working-directory: ./
run: |
./src/docker/pull.sh --no-debug
- uses: actions/setup-node@v6
with:
node-version: '22'
- name: Install
uses: pnpm/action-setup@v4
with:
run_install: true
- name: Build itk-wasm
run: |
pnpm run --aggregate-output --filter itk-wasm build
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm run test
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report-hello-world
path: playwright-report/
retention-days: 30