This repository was archived by the owner on Nov 21, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +41
-7
lines changed
Expand file tree Collapse file tree 1 file changed +41
-7
lines changed Original file line number Diff line number Diff line change @@ -2,24 +2,58 @@ name: Go
22
33on :
44 push :
5- branches : [ master ]
5+ branches : [ "main" ]
66 pull_request :
7- branches : [ master ]
7+ branches : [ "main" ]
88
99jobs :
10-
1110 build :
1211 runs-on : ubuntu-latest
1312 steps :
14- - uses : actions/checkout@v2
13+ - uses : actions/checkout@v3
1514
1615 - name : Set up Go
17- uses : actions/setup-go@v2
16+ uses : actions/setup-go@v4
1817 with :
19- go-version : 1.18
18+ go-version : ' 1.21 '
2019
2120 - name : Build
2221 run : go build -v ./...
2322
23+ check :
24+ runs-on : ubuntu-latest
25+ steps :
26+ - uses : actions/checkout@v4
27+
28+ - name : Set up Go
29+ uses : actions/setup-go@v4
30+ with :
31+ go-version : ' 1.21'
32+
33+ - name : Verify modfile
34+ run : go mod verify
35+
36+ - name : Vet
37+ run : go vet ./...
38+
39+ - name : Install golint
40+ run : go install golang.org/x/lint/golint@latest
41+
42+ - name : Lint
43+ run : golint -set_exit_status ./...
44+
45+ - name : Check code formatting using gofmt
46+ uses :
Jerome1337/[email protected] 47+
48+ test :
49+ runs-on : ubuntu-latest
50+ steps :
51+ - uses : actions/checkout@v4
52+
53+ - name : Set up Go
54+ uses : actions/setup-go@v4
55+ with :
56+ go-version : ' 1.21'
57+
2458 - name : Test
25- run : go test -v ./...
59+ run : go test -v ./...
You can’t perform that action at this time.
0 commit comments