Skip to content

Commit 3695ff8

Browse files
committed
ci(hello-world): add playwright testing
1 parent 181c0f1 commit 3695ff8

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/javascript-typescript.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
3636
- uses: actions/setup-node@v4
3737
with:
38-
node-version: '20'
38+
node-version: '22'
3939

4040
- name: Install
4141
uses: pnpm/action-setup@v4

.github/workflows/playwright.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,43 @@ jobs:
212212
name: playwright-report-${{ matrix.package }}
213213
path: packages/${{ matrix.package }}/typescript/playwright-report/
214214
retention-days: 30
215+
216+
test-hello-world-example:
217+
defaults:
218+
run:
219+
working-directory: ./examples/hello-world
220+
timeout-minutes: 60
221+
runs-on: ubuntu-24.04
222+
steps:
223+
- uses: actions/checkout@v4
224+
- name: Free Disk Space (Ubuntu)
225+
uses: jlumbroso/free-disk-space@main
226+
227+
- name: Pull latest Docker images
228+
run: |
229+
./src/docker/pull.sh --no-debug
230+
231+
- uses: actions/setup-node@v4
232+
with:
233+
node-version: '22'
234+
235+
- name: Install
236+
uses: pnpm/action-setup@v4
237+
with:
238+
run_install: true
239+
240+
- name: Build itk-wasm
241+
run: |
242+
pnpm run --aggregate-output --filter itk-wasm build
243+
- name: Install dependencies
244+
run: pnpm install
245+
- name: Install Playwright Browsers
246+
run: pnpx playwright install --with-deps
247+
- name: Run Playwright tests
248+
run: pnpm run test
249+
- uses: actions/upload-artifact@v4
250+
if: ${{ !cancelled() }}
251+
with:
252+
name: playwright-report-hello-world
253+
path: playwright-report/
254+
retention-days: 30

0 commit comments

Comments
 (0)