-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (96 loc) ยท 3.64 KB
/
develop-check.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
113
114
115
116
117
name: build + eslint check
on:
pull_request:
branches:
- develop
jobs:
check:
name: check
runs-on: ubuntu-latest
outputs:
client: ${{steps.filter.outputs.client}}
server: ${{steps.filter.outputs.server}}
noti-server: ${{steps.filter.outputs.server}}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
client:
- 'client/**'
server:
- 'server/**'
noti-server:
- 'noti-server/**'
client:
needs: check
if: ${{needs.check.outputs.client=='true'}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Nodejs Setup
uses: actions/setup-node@v3
- name: Cache client node modules
id: cache-client
uses: actions/cache@v3
with:
path: client/node_modules
key: npm-packages-client-${{hashFiles('**/package-lock.json')}}
restore-keys: |
npm-packages-client-
- name: Install client dependencies
if: ${{steps.cache-client.outputs.cache-hit != 'true'}}
run: cd client && npm install
- name: Client eslint check
run: ./client/node_modules/.bin/eslint client/src --ext .ts,.tsx
- name: Run client build check
run: cd client && npm run build
server:
needs: check
if: ${{needs.check.outputs.server=='true'}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Nodejs Setup
uses: actions/setup-node@v3
- name: Cache server node modules
id: cache-server
uses: actions/cache@v3
with:
path: server/node_modules
key: npm-packages-server-${{hashFiles('**/package-lock.json')}}
restore-keys: |
npm-packages-server-
- name: Install server dependencies
if: ${{steps.cache-server.outputs.cache-hit != 'true'}}
run: cd server && npm install
- name: server eslint check
run: ./server/node_modules/.bin/eslint server/src --ext .ts,.tsx
- name: Run server build check
run: cd server && npm run build
noti-server:
needs: check
if: ${{needs.check.outputs.noti-server=='true'}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Nodejs Setup
uses: actions/setup-node@v3
- name: Cache noti-server node modules
id: cache-noti-server
uses: actions/cache@v3
with:
path: noti-server/node_modules
key: npm-packages-noti-server-${{hashFiles('**/package-lock.json')}}
restore-keys: |
npm-packages-noti-server-
- name: Install noti-server dependencies
if: ${{steps.cache-noti-server.outputs.cache-hit != 'true'}}
run: cd noti-server && npm install
- name: Noti server eslint check
run: ./noti-server/node_modules/.bin/eslint noti-server/src --ext .ts,.tsx
- name: Run noti server build check
run: cd noti-server && npm run build