11
11
files-changed :
12
12
uses : ./.github/workflows/files-changed.yml
13
13
14
+
14
15
lint-backend :
15
16
if : needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
16
17
needs : files-changed
@@ -21,10 +22,27 @@ jobs:
21
22
with :
22
23
go-version-file : go.mod
23
24
check-latest : true
24
- - run : make deps-backend deps-tools
25
- - run : make lint-backend
25
+ - run : make deps-backend
26
+ - uses : actions/cache/restore@v4
27
+ with :
28
+ path : |
29
+ ~/.cache/golangci-lint
30
+ ~/.cache/gopls
31
+ key : golangci-v1.59.0-linux-${{ runner.arch }}-${{hashFiles('go.mod')}}
26
32
env :
27
- TAGS : bindata sqlite sqlite_unlock_notify
33
+ GOOS : linux
34
+ - uses : golangci/golangci-lint-action@v6
35
+ with :
36
+ version : v1.59.0
37
+ skip-cache : true
38
+ args : --build-tags bindata,sqlite,sqlite_unlock_notify
39
+ - run : make lint-go-vet lint-go-gopls lint-editorconfig
40
+ - uses : actions/cache/save@v4
41
+ with :
42
+ path : |
43
+ ~/.cache/golangci-lint
44
+ ~/.cache/gopls
45
+ key : golangci-v1.59.0-linux-${{ runner.arch }}-${{hashFiles('go.mod')}}
28
46
29
47
lint-templates :
30
48
if : needs.files-changed.outputs.templates == 'true'
@@ -94,12 +112,28 @@ jobs:
94
112
with :
95
113
go-version-file : go.mod
96
114
check-latest : true
97
- - run : make deps-backend deps-tools
98
- - run : make lint-go-windows lint-go-vet
115
+ - run : make deps-backend
116
+ - uses : actions/cache/restore@v4
117
+ with :
118
+ path : |
119
+ ~/.cache/golangci-lint
120
+ ~/.cache/gopls
121
+ key : golangci-v1.59.0-windows-${{ runner.arch }}-${{hashFiles('go.mod')}}
99
122
env :
100
- TAGS : bindata sqlite sqlite_unlock_notify
101
123
GOOS : windows
102
- GOARCH : amd64
124
+ - uses : golangci/golangci-lint-action@v6
125
+ with :
126
+ version : v1.59.0
127
+ skip-cache : true
128
+ args : --build-tags bindata,sqlite,sqlite_unlock_notify
129
+ env :
130
+ GOOS : windows
131
+ - uses : actions/cache/save@v4
132
+ with :
133
+ path : |
134
+ ~/.cache/golangci-lint
135
+ ~/.cache/gopls
136
+ key : golangci-v1.59.0-windows-${{ runner.arch }}-${{hashFiles('go.mod')}}
103
137
104
138
lint-go-gogit :
105
139
if : needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
@@ -111,10 +145,28 @@ jobs:
111
145
with :
112
146
go-version-file : go.mod
113
147
check-latest : true
114
- - run : make deps-backend deps-tools
115
- - run : make lint-go
148
+ - run : make deps-backend
149
+ - uses : actions/cache/restore@v4
150
+ with :
151
+ path : |
152
+ ~/.cache/golangci-lint
153
+ ~/.cache/gopls
154
+ key : golangci-v1.59.0-linux-gogit-${{ runner.arch }}-${{hashFiles('go.mod')}}
116
155
env :
117
- TAGS : bindata gogit sqlite sqlite_unlock_notify
156
+ GOOS : linux
157
+ - uses : golangci/golangci-lint-action@v6
158
+ with :
159
+ version : v1.59.0
160
+ skip-cache : true
161
+ args : --build-tags gogit,bindata,sqlite,sqlite_unlock_notify
162
+ env :
163
+ GOOS : linux
164
+ - uses : actions/cache/save@v4
165
+ with :
166
+ path : |
167
+ ~/.cache/golangci-lint
168
+ ~/.cache/gopls
169
+ key : golangci-v1.59.0-linux-gogit-${{ runner.arch }}-${{hashFiles('go.mod')}}
118
170
119
171
checks-backend :
120
172
if : needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
0 commit comments