Skip to content

Commit a7c6fca

Browse files
committed
test: Add Storybook tests to CI
1 parent 158ab08 commit a7c6fca

File tree

5 files changed

+8472
-2789
lines changed

5 files changed

+8472
-2789
lines changed

.github/workflows/webui.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ jobs:
3232
run: npm run check
3333
working-directory: tools/server/webui
3434

35+
- name: Install Playwright browsers
36+
run: npx playwright install --with-deps
37+
working-directory: tools/server/webui
38+
39+
- name: Build Storybook
40+
run: npm run build-storybook
41+
working-directory: tools/server/webui
42+
43+
- name: Run Storybook tests
44+
run: |
45+
npm run test:storybook
46+
working-directory: tools/server/webui
47+
3548
- name: Build application
3649
run: npm run build
3750
working-directory: tools/server/webui
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { setProjectAnnotations } from '@storybook/sveltekit';
2+
import * as previewAnnotations from './preview';
3+
import { beforeAll } from 'vitest';
4+
5+
const project = setProjectAnnotations([previewAnnotations]);
6+
7+
beforeAll(async () => {
8+
if (project.beforeAll) {
9+
await project.beforeAll();
10+
}
11+
});

0 commit comments

Comments
 (0)