File tree Expand file tree Collapse file tree 1 file changed +28
-12
lines changed
Expand file tree Collapse file tree 1 file changed +28
-12
lines changed Original file line number Diff line number Diff line change 1- # This workflow will build a golang project
2- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3-
41name : Go
52
63on :
74 push :
8- branches : [ "main" ]
9- pull_request :
10- branches : [ "main" ]
5+ branches : ["main"]
116
127jobs :
138
149 build :
1510 runs-on : ubuntu-latest
1611 steps :
17- - uses : actions/checkout@v4
18-
19- - name : Set up Go
20- uses : actions/setup-go@v4
21- with :
22- go-version : ' 1.22'
12+ - uses : actions/checkout@v3
13+ - uses : actions/setup-go@v4
2314
2415 - name : Build
2516 run : go build -v ./...
2617
18+ tests :
19+ needs : build
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v3
23+ - uses : actions/setup-go@v4
24+
2725 - name : Test
2826 run : go test -v ./...
27+
28+ tests-race :
29+ needs : build
30+ runs-on : ubuntu-latest
31+ steps :
32+ - uses : actions/checkout@v3
33+ - uses : actions/setup-go@v4
34+
35+ - name : Test
36+ run : go test -race -v ./...
37+
38+ lint :
39+ needs : [tests, tests-race]
40+ runs-on : ubuntu-latest
41+ steps :
42+ - uses : actions/checkout@v3
43+ - uses : actions/setup-go@v4
44+ - uses : golangci/golangci-lint-action@v3
You can’t perform that action at this time.
0 commit comments