-
Notifications
You must be signed in to change notification settings - Fork 9
51 lines (41 loc) · 1.24 KB
/
storybook-test.yaml
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
name: "Storybook Tests"
on:
push:
paths:
- "web/apps/web/**"
- "web/packages/**"
- ".github/**"
pull_request:
paths:
- "web/apps/web/**"
- "web/packages/**"
- ".github/**"
jobs:
test:
timeout-minutes: 10
runs-on: ubuntu-latest
env:
CYPRESS_INSTALL_BINARY: "0"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9
run_install: false
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: "web/pnpm-lock.yaml"
- run: npm install concurrently http-server wait-on -g
- working-directory: ./web
run: pnpm install
- working-directory: ./web
run: |
pnpm turbo run build-storybook --filter=storybook
- working-directory: ./web/apps/storybook
run: ./node_modules/.bin/playwright install --with-deps chromium
- working-directory: ./web/apps/storybook
run: |
concurrently -k -s first -n "SB,TEST" -c "magenta,blue" "http-server storybook-static --port 6006 --silent" "wait-on tcp:6006 && ./node_modules/.bin/test-storybook"