Skip to content

Commit c46d2c4

Browse files
committed
golang lint
1 parent ee8270e commit c46d2c4

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

.github/workflows/check.yaml

+23-15
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ on:
55
pull_request:
66
branches:
77
- main
8+
- release-*
89
push:
910
branches:
1011
- main
12+
- release-*
13+
14+
env:
15+
GO_VERSION: '1.20'
16+
1117
jobs:
1218
Test:
1319
name: Unit Test
@@ -17,10 +23,10 @@ jobs:
1723
uses: actions/checkout@v3
1824
with:
1925
fetch-depth: 0
20-
- name: Set up Go 1.19
26+
- name: Set up Go
2127
uses: actions/setup-go@v2
2228
with:
23-
go-version: 1.19
29+
go-version: ${{ env.GO_VERSION }}
2430

2531
- run: go build ./...
2632
- run: go vet ./...
@@ -38,19 +44,21 @@ jobs:
3844
name: Golang Lint
3945
runs-on: ubuntu-latest
4046
steps:
41-
- name: Checkout
42-
uses: actions/checkout@v3
43-
with:
44-
fetch-depth: 0
45-
- name: Set up Go 1.19
46-
uses: actions/setup-go@v2
47-
with:
48-
go-version: 1.19
49-
- name: golangci-lint
50-
uses: golangci/golangci-lint-action@v3
51-
with:
52-
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
53-
version: latest
47+
- name: Checkout
48+
uses: actions/checkout@v3
49+
with:
50+
fetch-depth: 0
51+
- name: Set up Go
52+
uses: actions/setup-go@v4
53+
with:
54+
go-version: ${{ env.GO_VERSION }}
55+
cache: false
56+
- name: golangci-lint
57+
uses: golangci/golangci-lint-action@v3
58+
with:
59+
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
60+
version: v1.53
61+
args: --timeout=30m
5462

5563
# Lints Pull Request commits with commitlint.
5664
#

0 commit comments

Comments
 (0)