forked from czm1290433700/test_demo
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 888 Bytes
/
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
name: test
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- name: Run install
run: npm install
- name: Run Jest coverage
run: npm run test:coverage &
- name: Build storybook
run: npm run build-storybook
- name: Serve storybook
run: nohup npx http-server -p 6006 storybook-static &
- name: Run Cypress coverage
run: npx wait-on http://127.0.0.1:6006 && npm run cypress:run
- name: Run Coverage merge
run: npm run coverage:merge
- name: Run codecov
run: npx codecov --token=${{ secrets.CODECOV_TOKEN }} --file=coverage.json
- name: Run test
run: npm run test