1
- ---
2
1
name : test
3
2
4
- on : ["push", "pull_request"]
3
+ on :
4
+ - push
5
+ - pull_request
5
6
6
7
env :
7
- GO_VERSION : " 1.22"
8
- LINUX_ARCHES : " amd64 386 arm arm64 s390x mips64le ppc64le"
8
+ GO_VERSION : ' 1.22'
9
+ LINUX_ARCHES : amd64 386 arm arm64 s390x mips64le ppc64le
9
10
10
11
jobs :
11
- lint :
12
- name : Lint
13
- runs-on : ubuntu-latest
14
- steps :
15
- - name : setup go
16
- uses : actions/setup-go@v5
17
- with :
18
- go-version : ${{ env.GO_VERSION }}
19
- - uses : actions/checkout@v4
20
- - uses : ibiqlik/action-yamllint@v3
21
- with :
22
- format : auto
23
- - uses : golangci/golangci-lint-action@v6
24
- with :
25
- args : --verbose
26
- version : v1.57.1
12
+
27
13
build :
28
14
name : Build all linux architectures
29
15
needs : lint
30
16
runs-on : ubuntu-latest
31
17
steps :
32
18
- name : setup go
33
- uses : actions/setup-go@v5
19
+ uses : actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
34
20
with :
35
21
go-version : ${{ env.GO_VERSION }}
36
- - uses : actions/checkout@v4
37
-
22
+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
38
23
- name : Build on all supported architectures
39
24
run : |
40
25
set -e
@@ -43,28 +28,45 @@ jobs:
43
28
GOARCH=$arch go build ./...
44
29
done
45
30
31
+ lint :
32
+ name : Lint
33
+ permissions :
34
+ contents : read
35
+ pull-requests : read
36
+ runs-on : ubuntu-latest
37
+ steps :
38
+ - name : setup go
39
+ uses : actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
40
+ with :
41
+ go-version : ${{ env.GO_VERSION }}
42
+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
43
+ - uses : ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c # v3.1.1
44
+ with :
45
+ format : auto
46
+ - uses : golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
47
+ with :
48
+ args : --verbose
49
+ version : v1.57.1
50
+
46
51
test-linux :
47
52
name : Run tests on Linux amd64
48
53
needs : build
49
54
runs-on : ubuntu-latest
50
55
steps :
51
56
- name : setup go
52
- uses : actions/setup-go@v5
57
+ uses : actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
53
58
with :
54
59
go-version : ${{ env.GO_VERSION }}
55
- - uses : actions/checkout@v4
56
-
60
+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
57
61
- name : Install test binaries
58
62
run : |
59
63
go install github.com/mattn/[email protected]
60
64
go install github.com/modocache/gover@latest
61
-
62
65
- name : test
63
66
run : COVERALLS=1 ./test.sh
64
-
65
- - name : Send coverage to coveralls
66
- env :
67
+ - env :
67
68
COVERALLS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
69
+ name : Send coverage to coveralls
68
70
run : |
69
71
PATH=$PATH:$(go env GOPATH)/bin
70
72
gover
76
78
runs-on : windows-latest
77
79
steps :
78
80
- name : setup go
79
- uses : actions/setup-go@v5
81
+ uses : actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
80
82
with :
81
83
go-version : ${{ env.GO_VERSION }}
82
- - uses : actions/checkout@v4
84
+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
83
85
- name : test
84
86
run : bash ./test.sh
0 commit comments