-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (34 loc) · 976 Bytes
/
smoke_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
name: Smoke Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
defaults:
run:
working-directory: react-app
jobs:
test:
name: Smoke Tests
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm ci
- name: Install Test Dependencies
run: npm install concurrently http-server wait-on
- name: Build Storybook
run: npm run build-storybook
- name: Serve Storybook and run tests
env:
PORT: 8080
HOST: 127.0.0.1
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port $PORT -a $HOST" \
"npx wait-on http://$HOST:$PORT/ && npm run storybook:test -- --ci --url http://$HOST:$PORT/"