-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.28 KB
/
storybook-test.yml
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
name: Storybook Tests
on:
pull_request:
branches:
- '*'
- '*/*'
- '**'
jobs:
test-flow:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build Storybook
run: yarn storybook:build --quiet
- name: Serve Storybook and run tests
run: |
npx concurrently -k -s first -n "Storybook Build,Storybook Test" -c "auto" \
"npx http-server storybook-static --port 6006 --silent" \
"npx wait-on http-get://127.0.0.1:6006 && test-storybook"
chromatic-flow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn
- name: Publish to Chromatic
uses: chromaui/action@latest
with:
projectToken: "chpt_ca9ead39821522d"
autoAcceptChanges: "main"
buildScriptName: "storybook:build"
env:
CI: true