File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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+
4+ name : Go
5+
6+ on :
7+ push :
8+ branches : [ "main" ]
9+ pull_request :
10+ branches : [ "main" ]
11+
12+ env :
13+ GO_VERSION : 1.22.x
14+
15+ jobs :
16+
17+ build :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v4
21+
22+ - name : Set up Go
23+ uses : actions/setup-go@v5
24+ with :
25+ go-version : ${{ env.GO_VERSION }}
26+
27+ - name : Check go mod
28+ run : |
29+ go mod tidy
30+ git diff --exit-code go.mod
31+
32+ - name : Build
33+ run : go build -v ./...
34+
35+ - name : Test
36+ run : go test -v ./...
37+
38+ - name : Lint
39+ uses : golangci/golangci-lint-action@v6.1.1
40+ with :
41+ version : latest
42+ skip-build-cache : true
43+ skip-pkg-cache : true
You can’t perform that action at this time.
0 commit comments