-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (100 loc) · 2.78 KB
/
frontend-react-ci.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Frontend React CI
# Events that trigger this workflow
on: [push, pull_request]
# Defines which tool versions should be used in all workflow jobs
env:
node: '20'
pnpm: '8'
defaults:
run:
working-directory: ./frontend-react
jobs:
style:
name: Style
runs-on: ubuntu-latest
steps:
- name: Checkout 📥
uses: actions/[email protected]
- name: Setup PNPM 💿
uses: pnpm/[email protected]
with:
version: ${{ env.pnpm }}
- name: Setup Node 💿
uses: actions/[email protected]
with:
node-version: ${{ env.node }}
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install dependencies 📚
run: pnpm install
- name: Check code style 🧽
run: pnpm run ci:style
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout 📥
uses: actions/[email protected]
- name: Setup PNPM 💿
uses: pnpm/[email protected]
with:
version: ${{ env.pnpm }}
- name: Setup Node 💿
uses: actions/[email protected]
with:
node-version: ${{ env.node }}
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install dependencies 📚
run: pnpm install
- name: Run Linter 📑
run: pnpm run lint
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout 📥
uses: actions/[email protected]
- name: Setup PNPM 💿
uses: pnpm/[email protected]
with:
version: ${{ env.pnpm }}
- name: Setup Node 💿
uses: actions/[email protected]
with:
node-version: ${{ env.node }}
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install dependencies 📚
run: pnpm install
- name: Build library 📦
run: pnpm run build
- name: Pack library 📦
run: pnpm pack
- name: Upload package artifact 📤
uses: actions/[email protected]
with:
name: package.tgz
path: ./frontend-react/wuespace-telestion-*.tgz
retention-days: 7
unit-test:
name: Unit Test
runs-on: ubuntu-latest
steps:
- name: Checkout 📥
uses: actions/[email protected]
- name: Setup PNPM 💿
uses: pnpm/[email protected]
with:
version: ${{ env.pnpm }}
- name: Setup Node 💿
uses: actions/[email protected]
with:
node-version: ${{ env.node }}
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install dependencies 📚
run: pnpm install
- name: Run unit tests 🛃
run: |
pnpm run ci:test