@@ -137,6 +137,78 @@ jobs:
137137 - uses : actions/upload-artifact@v4
138138 if : ${{ !cancelled() }}
139139 with :
140- name : playwright-report
140+ name : playwright-report-itk-wasm
141141 path : packages/core/typescript/itk-wasm/playwright-report/
142- retention-days : 30
142+ retention-days : 30
143+
144+ test-packages :
145+ name : browser tests
146+ runs-on : ubuntu-24.04
147+ strategy :
148+ max-parallel : 3
149+ matrix :
150+ package : [compare-images]
151+
152+ steps :
153+ - name : Checkout
154+ uses : actions/checkout@v4
155+
156+ - name : Free Disk Space (Ubuntu)
157+ uses : jlumbroso/free-disk-space@main
158+ with :
159+ large-packages : false
160+ tool-cache : true
161+
162+ - uses : nick-fields/retry@v3
163+ name : Pull latest Docker images
164+ with :
165+ max_attempts : 5
166+ timeout_minutes : 10
167+ command : ./src/docker/pull.sh --no-debug
168+
169+ - name : Install
170+ uses : pnpm/action-setup@v4
171+
172+ - uses : actions/setup-node@v4
173+ with :
174+ node-version : ' 22'
175+ cache : pnpm
176+
177+ - name : Install Playwright Browsers
178+ run : pnpx playwright install --with-deps
179+
180+ - name : pnpm install
181+ run : pnpm install --frozen-lockfile
182+ - name : Build itk-wasm
183+ run : |
184+ pnpm run --aggregate-output --filter itk-wasm build
185+
186+ - name : Build @itk-wasm/demo-app
187+ run : |
188+ pnpm run --aggregate-output --filter '@itk-wasm/demo-app' build
189+
190+ - name : Build build:gen:typescript
191+ run : |
192+ pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build..." build:gen:typescript
193+
194+ - name : Build typescript
195+ run : |
196+ pnpm install
197+ # Build the generated TypeScript package
198+ pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}..." build:tsc
199+ pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}" build
200+
201+ - name : Download test data
202+ run : |
203+ pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" test:data:download
204+
205+ - name : Run Playwright tests
206+ working-directory : packages/${{ matrix.package }}/typescript
207+ run : pnpm run test:browser
208+
209+ - uses : actions/upload-artifact@v4
210+ if : ${{ !cancelled() }}
211+ with :
212+ name : playwright-report-${{ matrix.package }}
213+ path : packages/${{ matrix.package }}/typescript/playwright-report/
214+ retention-days : 30
0 commit comments