-
Notifications
You must be signed in to change notification settings - Fork 568
72 lines (59 loc) · 1.78 KB
/
main.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: build
on:
# run on push but only for the main branch
push:
branches:
- main
# run for every pull request
pull_request: {}
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 🤝 Set Node version from .nvmrc
run: echo NVMRC=`cat .nvmrc` >> $GITHUB_ENV
- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NVMRC }}
registry-url: "https://registry.npmjs.org"
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: ▶️ Run Lint
run: npm run lint
- name: ▶️ Run Typecheck
run: npm run typecheck
- name: ▶️ Run Karma
run: npm run karma
- name: ▶️ Run Jest SSR
run: npm run jest-ssr
- name: ▶️ Run Jest Screenshot
run: npm run jest-screenshot
- name: ▶️ Run Percy Screenshot
if: ${{ github.actor != 'renovate[bot]' }}
run: npm run percy-screenshot
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
- name: ▶️ Run Build
run: npm run build
- name: ⬆️ Upload karma coverage report
uses: codecov/codecov-action@v3
with:
directory: ./coverage/karma
flags: karma
- name: ⬆️ Upload jest coverage report
uses: codecov/codecov-action@v3
with:
directory: ./coverage/jest
flags: jest
- name: 🤏 Check Bundle Size
run: npm run check-size
env:
BUNDLEMON_PROJECT_ID: 6166e8ee491d1e00090fee72
CI_COMMIT_SHA: ${{github.event.pull_request.head.sha || github.sha}}