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+ name : Go
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+
7+ build :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout code
11+ uses : actions/checkout@v6
12+
13+ - name : Set up Go
14+ uses : actions/setup-go@v6
15+ with :
16+ go-version : ' 1.25.7'
17+
18+ - name : Check Formatting
19+ run : |
20+ if [ -n "$(gofmt -l .)" ]; then
21+ echo "Go code is not formatted:"
22+ gofmt -d .
23+ exit 1
24+ fi
25+ working-directory : ./golang
26+
27+ - name : GolangCI-Lint
28+ uses : golangci/golangci-lint-action@v6
29+ with :
30+ version : latest
31+ working-directory : ./golang
32+ env :
33+ GOFLAGS : " -buildvcs=false"
34+
35+ - name : Run Gosec Security Scanner
36+ uses : securego/gosec@master
37+ with :
38+ args : ./golang/...
39+ env :
40+ GOTOOLCHAIN : auto
41+
42+ - name : Run govulncheck
43+ run : |
44+ go install golang.org/x/vuln/cmd/govulncheck@latest
45+ govulncheck ./...
46+ working-directory : ./golang
47+
48+ - name : Test
49+ run : go test -v -coverprofile=coverage.out ./...
50+ working-directory : ./golang
You can’t perform that action at this time.
0 commit comments