Skip to content

Commit a1855b3

Browse files
authored
Merge branch 'master' into patch-1
2 parents 6f4a639 + 6666d8f commit a1855b3

File tree

219 files changed

+46523
-2856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+46523
-2856
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Setup Golang environment"
2+
description: "A reusable workflow that's used to set up the Go environment and cache."
3+
inputs:
4+
go-version:
5+
description: "The version of Golang to set up"
6+
required: true
7+
8+
runs:
9+
using: "composite"
10+
11+
steps:
12+
- name: set git config
13+
shell: bash
14+
run: |
15+
git config --global core.eol lf
16+
git config --global core.autocrlf false
17+
18+
- name: setup go ${{ inputs.go-version }}
19+
uses: actions/setup-go@v3
20+
with:
21+
go-version: '${{ inputs.go-version }}'
22+
23+
- name: go cache
24+
uses: actions/cache@v3
25+
with:
26+
path: |
27+
/home/runner/go/pkg/mod
28+
/home/runner/.cache/go-build
29+
key: litd-${{ runner.os }}-go-${{ inputs.go-version }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
30+
restore-keys: |
31+
litd-${{ runner.os }}-go-${{ inputs.go-version }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
32+
litd-${{ runner.os }}-go-${{ inputs.go-version }}-${{ github.job }}-
33+
litd-${{ runner.os }}-go-${{ inputs.go-version }}-
34+
litd-${{ runner.os }}-go-
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "Setup Node environment"
2+
description: "A reusable workflow that's used to set up the Node environment and cache."
3+
inputs:
4+
node-version:
5+
description: "The version of Node to set up"
6+
required: true
7+
8+
runs:
9+
using: "composite"
10+
11+
steps:
12+
- name: set git config
13+
shell: bash
14+
run: |
15+
git config --global core.eol lf
16+
git config --global core.autocrlf false
17+
18+
- name: setup nodejs v${{ inputs.node-version }}
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '${{ inputs.node-version }}'
22+
23+
- name: get yarn cache dir
24+
id: yarn-cache-dir
25+
shell: bash
26+
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_ENV
27+
28+
- name: yarn cache
29+
uses: actions/cache@v3
30+
id: yarn-cache
31+
with:
32+
path: ${{ env.YARN_CACHE_DIR }}
33+
key: litd-${{ runner.os }}-yarn-${{ inputs.node-version }}-${{ hashFiles('**/yarn.lock') }}
34+
restore-keys: |
35+
litd-${{ runner.os }}-yarn-${{ inputs.node-version }}-${{ hashFiles('**/yarn.lock') }}
36+
litd-${{ runner.os }}-yarn-${{ inputs.node-version }}-
37+
litd-${{ runner.os }}-yarn-

.github/workflows/main.yml

Lines changed: 47 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ on:
99
- "*"
1010

1111
env:
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

2017
jobs:
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

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ RUN apk add --no-cache --update alpine-sdk \
3535
# If you change this value, please also update:
3636
# /dev.Dockerfile
3737
# /.github/workflows/main.yml
38-
FROM golang:1.18-alpine as golangbuilder
38+
FROM golang:1.19-alpine as golangbuilder
3939

4040
# Instead of checking out from git again, we just copy the whole working
4141
# directory of the previous stage that includes the generated static assets.
@@ -68,6 +68,7 @@ COPY --from=golangbuilder /go/bin/lncli /bin/
6868
COPY --from=golangbuilder /go/bin/frcli /bin/
6969
COPY --from=golangbuilder /go/bin/loop /bin/
7070
COPY --from=golangbuilder /go/bin/pool /bin/
71+
COPY --from=golangbuilder /go/bin/tapcli /bin/
7172

7273
# Add bash.
7374
RUN apk add --no-cache \

0 commit comments

Comments
 (0)