99 - " *"
1010
1111env :
12- # go needs absolute directories, using the $HOME variable doesn't work here.
13- DOWNLOAD_CACHE : /home/runner/work/download_cache
14-
1512 # If you change this value, please change it in the following files as well:
1613 # /Dockerfile
1714 # /dev.Dockerfile
18- GO_VERSION : 1.18
15+ GO_VERSION : 1.19
1916
2017jobs :
2118 # #######################
@@ -31,33 +28,15 @@ jobs:
3128 os : [ubuntu-latest, windows-latest, macOS-latest]
3229
3330 steps :
34- - name : set git config
35- run : |
36- git config --global core.eol lf
37- git config --global core.autocrlf false
38-
3931 - 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
4433 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
5035
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
5438 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 }}'
6140
6241 - name : install dependencies
6342 working-directory : ./app
@@ -88,43 +67,20 @@ jobs:
8867 os : [ubuntu-latest, windows-latest, macOS-latest]
8968
9069 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-
9670 - name : git checkout
97- uses : actions/checkout@v2
98-
99- - name : go cache
100- uses : actions/cache@v2
71+ uses : actions/checkout@v3
10172 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
11677 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
12682 with :
127- go-version : ' ~ ${{ matrix.go_version }}'
83+ go-version : ' ${{ env.GO_VERSION }}'
12884
12985 - name : build backend binary
13086 run : make build
@@ -139,51 +95,27 @@ jobs:
13995 name : RPC proto compilation check
14096 runs-on : ubuntu-latest
14197 steps :
142- - name : set git config
143- run : |
144- git config --global core.eol lf
145- git config --global core.autocrlf false
146-
14798 - 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
152100 with :
153- node-version : 16.x
101+ fetch-depth : 0
154102
155- - name : download cache
156- uses : actions/cache@v1
103+ - name : setup nodejs ${{ matrix.node_version }}
104+ uses : ./.github/ actions/setup-node
157105 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
171110 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 }}'
178112
179113 - name : install dependencies
180114 working-directory : ./app
181115 run : yarn
182116
183- - name : setup go ${{ env.GO_VERSION }}
184- uses : actions/setup-go@v2
185- with :
186- go-version : ' ${{ env.GO_VERSION }}'
117+ - name : run check
118+ run : make rpc-js-compile && make protos-check
187119
188120 - name : compile rpc for golang
189121 run : make rpc
@@ -200,23 +132,12 @@ jobs:
200132 runs-on : ubuntu-latest
201133 steps :
202134 - name : git checkout
203- uses : actions/checkout@v2
135+ uses : actions/checkout@v3
204136 with :
205137 fetch-depth : 0
206138
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-
218139 - name : setup go ${{ env.GO_VERSION }}
219- uses : actions/setup-go@v2
140+ uses : ./.github/ actions/setup-go
220141 with :
221142 go-version : ' ${{ env.GO_VERSION }}'
222143
@@ -235,16 +156,19 @@ jobs:
235156 # lint code
236157 # #######################
237158 lint :
159+ # Temporarily disabling the linter while this issue persists:
160+ # https://github.com/golangci/golangci-lint/discussions/1920
161+ if : false
238162 name : lint
239163 runs-on : ubuntu-latest
240164 steps :
241165 - name : git checkout
242- uses : actions/checkout@v2
166+ uses : actions/checkout@v3
243167 with :
244168 fetch-depth : 0
245169
246170 - name : setup go ${{ env.GO_VERSION }}
247- uses : actions/setup-go@v2
171+ uses : ./.github/ actions/setup-go
248172 with :
249173 go-version : ' ${{ env.GO_VERSION }}'
250174
@@ -262,12 +186,12 @@ jobs:
262186 runs-on : ubuntu-latest
263187 steps :
264188 - name : git checkout
265- uses : actions/checkout@v2
189+ uses : actions/checkout@v3
266190 with :
267191 fetch-depth : 0
268192
269193 - name : setup go ${{ env.GO_VERSION }}
270- uses : actions/setup-go@v2
194+ uses : ./.github/ actions/setup-go
271195 with :
272196 go-version : ' ${{ env.GO_VERSION }}'
273197
@@ -282,12 +206,12 @@ jobs:
282206 runs-on : ubuntu-latest
283207 steps :
284208 - name : git checkout
285- uses : actions/checkout@v2
209+ uses : actions/checkout@v3
286210 with :
287211 fetch-depth : 0
288212
289213 - name : setup go ${{ env.GO_VERSION }}
290- uses : actions/setup-go@v2
214+ uses : ./.github/ actions/setup-go
291215 with :
292216 go-version : ' ${{ env.GO_VERSION }}'
293217
@@ -301,51 +225,24 @@ jobs:
301225 name : integration test
302226 runs-on : ubuntu-latest
303227 steps :
304- - name : set git config
305- run : |
306- git config --global core.eol lf
307- git config --global core.autocrlf false
308-
309228 - name : git checkout
310- uses : actions/checkout@v2
311-
312- - name : setup nodejs v${{ matrix.node_version }}
313- uses : actions/setup-node@v1
229+ uses : actions/checkout@v3
314230 with :
315- node-version : 16.x
231+ fetch-depth : 0
316232
317- - name : download cache
318- uses : actions/cache@v1
233+ - name : setup nodejs ${{ matrix.node_version }}
234+ uses : ./.github/ actions/setup-node
319235 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
236+ node-version : ' ${{ matrix.node_version }}'
237+
238+ - name : setup go ${{ env.GO_VERSION }}
239+ uses : ./.github/actions/setup-go
333240 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-
241+ go-version : ' ${{ env.GO_VERSION }}'
340242
341243 - name : install dependencies
342244 working-directory : ./app
343245 run : yarn
344246
345- - name : setup go ${{ env.GO_VERSION }}
346- uses : actions/setup-go@v2
347- with :
348- go-version : ' ${{ env.GO_VERSION }}'
349-
350247 - name : run check
351248 run : make itest
0 commit comments