File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Go CI
2+
3+ on :
4+ push :
5+ branches : [master, develop, aicode]
6+ pull_request :
7+ branches : [master, develop, aicode]
8+
9+ jobs :
10+ test :
11+ name : Test
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Set up Go
16+ uses : actions/setup-go@v5
17+ with :
18+ go-version : ' 1.21'
19+
20+ - name : Checkout code
21+ uses : actions/checkout@v4
22+
23+ - name : Download dependencies
24+ run : go mod download
25+
26+ - name : Build
27+ run : go build -v ./...
28+
29+ - name : Run tests
30+ run : go test -v -race -coverprofile=coverage.out ./...
31+
32+ - name : Upload coverage
33+ uses : actions/upload-artifact@v4
34+ with :
35+ name : coverage
36+ path : coverage.out
37+
38+ lint :
39+ name : Lint
40+ runs-on : ubuntu-latest
41+
42+ steps :
43+ - name : Set up Go
44+ uses : actions/setup-go@v5
45+ with :
46+ go-version : ' 1.21'
47+
48+ - name : Checkout code
49+ uses : actions/checkout@v4
50+
51+ - name : Run golangci-lint
52+ uses : golangci/golangci-lint-action@v6
53+ with :
54+ version : latest
You can’t perform that action at this time.
0 commit comments