9
9
- " *"
10
10
11
11
env :
12
- # go needs absolute directories, using the $HOME variable doesn't work here.
13
- DOWNLOAD_CACHE : /home/runner/work/download_cache
14
-
15
12
# If you change this value, please change it in the following files as well:
16
13
# /Dockerfile
17
14
# /dev.Dockerfile
@@ -31,33 +28,15 @@ jobs:
31
28
os : [ubuntu-latest, windows-latest, macOS-latest]
32
29
33
30
steps :
34
- - name : set git config
35
- run : |
36
- git config --global core.eol lf
37
- git config --global core.autocrlf false
38
-
39
31
- name : git checkout
40
- uses : actions/checkout@v2
41
-
42
- - name : setup nodejs v${{ matrix.node_version }}
43
- uses : actions/setup-node@v1
32
+ uses : actions/checkout@v3
44
33
with :
45
- node-version : ${{ matrix.node_version }}
46
-
47
- - name : get yarn cache dir
48
- id : yarn-cache-dir
49
- run : echo "::set-output name=dir::$(yarn cache dir)"
34
+ fetch-depth : 0
50
35
51
- - name : yarn cache
52
- uses : actions/cache@v2
53
- id : yarn-cache
36
+ - name : setup nodejs ${{ matrix.node_version }}
37
+ uses : ./.github/actions/setup-node
54
38
with :
55
- path : ${{ steps.yarn-cache-dir.outputs.dir }}
56
- key : ${{ runner.os }}-yarn-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
57
- restore-keys : |
58
- ${{ runner.os }}-yarn-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
59
- ${{ runner.os }}-yarn-${{ matrix.node_version }}-
60
- ${{ runner.os }}-yarn-
39
+ node-version : ' ${{ matrix.node_version }}'
61
40
62
41
- name : install dependencies
63
42
working-directory : ./app
@@ -88,43 +67,20 @@ jobs:
88
67
os : [ubuntu-latest, windows-latest, macOS-latest]
89
68
90
69
steps :
91
- - name : Set git to use LF
92
- run : |
93
- git config --global core.eol lf
94
- git config --global core.autocrlf false
95
-
96
70
- name : git checkout
97
- uses : actions/checkout@v2
98
-
99
- - name : go cache
100
- uses : actions/cache@v2
71
+ uses : actions/checkout@v3
101
72
with :
102
- path : ~/go/pkg/mod
103
- key : ${{ runner.os }}-go-${{ matrix.go_version }}-${{ hashFiles('**/go.sum') }}
104
- restore-keys : |
105
- ${{ runner.os }}-go-${{ matrix.go_version }}-${{ hashFiles('**/go.sum') }}
106
- ${{ runner.os }}-go-${{ matrix.go_version }}-
107
- ${{ runner.os }}-go-
108
-
109
- - name : get yarn cache dir
110
- id : yarn-cache-dir
111
- run : echo "::set-output name=dir::$(yarn cache dir)"
112
-
113
- - name : yarn cache
114
- uses : actions/cache@v2
115
- id : yarn-cache
73
+ fetch-depth : 0
74
+
75
+ - name : setup nodejs ${{ matrix.node_version }}
76
+ uses : ./.github/actions/setup-node
116
77
with :
117
- path : ${{ steps.yarn-cache-dir.outputs.dir }}
118
- key : ${{ runner.os }}-yarn-16.x-${{ hashFiles('**/yarn.lock') }}
119
- restore-keys : |
120
- ${{ runner.os }}-yarn-16.x-${{ hashFiles('**/yarn.lock') }}
121
- ${{ runner.os }}-yarn-16.x-
122
- ${{ runner.os }}-yarn-
123
-
124
- - name : setup go v${{ matrix.go_version }}
125
- uses : actions/setup-go@v2
78
+ node-version : ' ${{ matrix.node_version }}'
79
+
80
+ - name : setup go ${{ env.GO_VERSION }}
81
+ uses : ./.github/actions/setup-go
126
82
with :
127
- go-version : ' ~ ${{ matrix.go_version }}'
83
+ go-version : ' ${{ env.GO_VERSION }}'
128
84
129
85
- name : build backend binary
130
86
run : make build
@@ -139,52 +95,25 @@ jobs:
139
95
name : RPC proto compilation check
140
96
runs-on : ubuntu-latest
141
97
steps :
142
- - name : set git config
143
- run : |
144
- git config --global core.eol lf
145
- git config --global core.autocrlf false
146
-
147
98
- name : git checkout
148
- uses : actions/checkout@v2
149
-
150
- - name : setup nodejs v16.x
151
- uses : actions/setup-node@v1
99
+ uses : actions/checkout@v3
152
100
with :
153
- node-version : 16.x
101
+ fetch-depth : 0
154
102
155
- - name : download cache
156
- uses : actions/cache@v1
103
+ - name : setup nodejs ${{ matrix.node_version }}
104
+ uses : ./.github/ actions/setup-node
157
105
with :
158
- path : /home/runner/work/download_cache
159
- key : litd-${{ runner.os }}-download-${{ hashFiles('**/install_protoc.sh') }}
160
- restore-keys : |
161
- litd-${{ runner.os }}-download-${{ hashFiles('**/install_protoc.sh') }}
162
- litd-${{ runner.os }}-download-
163
-
164
- - name : get yarn cache dir
165
- id : yarn-cache-dir
166
- run : echo "::set-output name=dir::$(yarn cache dir)"
167
-
168
- - name : yarn cache
169
- uses : actions/cache@v2
170
- id : yarn-cache
106
+ node-version : ' ${{ matrix.node_version }}'
107
+
108
+ - name : setup go ${{ env.GO_VERSION }}
109
+ uses : ./.github/actions/setup-go
171
110
with :
172
- path : ${{ steps.yarn-cache-dir.outputs.dir }}
173
- key : ${{ runner.os }}-yarn-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
174
- restore-keys : |
175
- ${{ runner.os }}-yarn-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
176
- ${{ runner.os }}-yarn-${{ matrix.node_version }}-
177
- ${{ runner.os }}-yarn-
111
+ go-version : ' ${{ env.GO_VERSION }}'
178
112
179
113
- name : install dependencies
180
114
working-directory : ./app
181
115
run : yarn
182
116
183
- - name : setup go ${{ env.GO_VERSION }}
184
- uses : actions/setup-go@v2
185
- with :
186
- go-version : ' ${{ env.GO_VERSION }}'
187
-
188
117
- name : compile rpc for golang
189
118
run : make rpc
190
119
@@ -200,23 +129,12 @@ jobs:
200
129
runs-on : ubuntu-latest
201
130
steps :
202
131
- name : git checkout
203
- uses : actions/checkout@v2
132
+ uses : actions/checkout@v3
204
133
with :
205
134
fetch-depth : 0
206
135
207
- - name : go cache
208
- uses : actions/cache@v1
209
- with :
210
- path : /home/runner/work/go
211
- key : litd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
212
- restore-keys : |
213
- litd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
214
- litd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
215
- litd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
216
- litd-${{ runner.os }}-go-
217
-
218
136
- name : setup go ${{ env.GO_VERSION }}
219
- uses : actions/setup-go@v2
137
+ uses : ./.github/ actions/setup-go
220
138
with :
221
139
go-version : ' ${{ env.GO_VERSION }}'
222
140
@@ -239,12 +157,12 @@ jobs:
239
157
runs-on : ubuntu-latest
240
158
steps :
241
159
- name : git checkout
242
- uses : actions/checkout@v2
160
+ uses : actions/checkout@v3
243
161
with :
244
162
fetch-depth : 0
245
163
246
164
- name : setup go ${{ env.GO_VERSION }}
247
- uses : actions/setup-go@v2
165
+ uses : ./.github/ actions/setup-go
248
166
with :
249
167
go-version : ' ${{ env.GO_VERSION }}'
250
168
@@ -262,12 +180,12 @@ jobs:
262
180
runs-on : ubuntu-latest
263
181
steps :
264
182
- name : git checkout
265
- uses : actions/checkout@v2
183
+ uses : actions/checkout@v3
266
184
with :
267
185
fetch-depth : 0
268
186
269
187
- name : setup go ${{ env.GO_VERSION }}
270
- uses : actions/setup-go@v2
188
+ uses : ./.github/ actions/setup-go
271
189
with :
272
190
go-version : ' ${{ env.GO_VERSION }}'
273
191
@@ -282,12 +200,12 @@ jobs:
282
200
runs-on : ubuntu-latest
283
201
steps :
284
202
- name : git checkout
285
- uses : actions/checkout@v2
203
+ uses : actions/checkout@v3
286
204
with :
287
205
fetch-depth : 0
288
206
289
207
- name : setup go ${{ env.GO_VERSION }}
290
- uses : actions/setup-go@v2
208
+ uses : ./.github/ actions/setup-go
291
209
with :
292
210
go-version : ' ${{ env.GO_VERSION }}'
293
211
@@ -301,51 +219,24 @@ jobs:
301
219
name : integration test
302
220
runs-on : ubuntu-latest
303
221
steps :
304
- - name : set git config
305
- run : |
306
- git config --global core.eol lf
307
- git config --global core.autocrlf false
308
-
309
222
- name : git checkout
310
- uses : actions/checkout@v2
311
-
312
- - name : setup nodejs v${{ matrix.node_version }}
313
- uses : actions/setup-node@v1
223
+ uses : actions/checkout@v3
314
224
with :
315
- node-version : 16.x
225
+ fetch-depth : 0
316
226
317
- - name : download cache
318
- uses : actions/cache@v1
227
+ - name : setup nodejs ${{ matrix.node_version }}
228
+ uses : ./.github/ actions/setup-node
319
229
with :
320
- path : /home/runner/work/download_cache
321
- key : litd-${{ runner.os }}-download-${{ hashFiles('**/install_protoc.sh') }}
322
- restore-keys : |
323
- litd-${{ runner.os }}-download-${{ hashFiles('**/install_protoc.sh') }}
324
- litd-${{ runner.os }}-download-
325
-
326
- - name : get yarn cache dir
327
- id : yarn-cache-dir
328
- run : echo "::set-output name=dir::$(yarn cache dir)"
329
-
330
- - name : yarn cache
331
- uses : actions/cache@v2
332
- id : yarn-cache
230
+ node-version : ' ${{ matrix.node_version }}'
231
+
232
+ - name : setup go ${{ env.GO_VERSION }}
233
+ uses : ./.github/actions/setup-go
333
234
with :
334
- path : ${{ steps.yarn-cache-dir.outputs.dir }}
335
- key : ${{ runner.os }}-yarn-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
336
- restore-keys : |
337
- ${{ runner.os }}-yarn-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
338
- ${{ runner.os }}-yarn-${{ matrix.node_version }}-
339
- ${{ runner.os }}-yarn-
235
+ go-version : ' ${{ env.GO_VERSION }}'
340
236
341
237
- name : install dependencies
342
238
working-directory : ./app
343
239
run : yarn
344
240
345
- - name : setup go ${{ env.GO_VERSION }}
346
- uses : actions/setup-go@v2
347
- with :
348
- go-version : ' ${{ env.GO_VERSION }}'
349
-
350
241
- name : run check
351
242
run : make itest
0 commit comments