File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ master, ci ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ test :
11+ name : Test
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Check out code
15+ uses : actions/checkout@v4
16+ - name : Set up Go
17+ uses : actions/setup-go@v5
18+ with :
19+ go-version : ' 1.24.2'
20+ - name : Cache Go modules
21+ uses : actions/cache@v4
22+ with :
23+ path : |
24+ ~/.cache/go-build
25+ ~/go/pkg/mod
26+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
27+ restore-keys : |
28+ ${{ runner.os }}-go-
29+ - name : Download dependencies
30+ run : go mod download
31+ - name : Verify dependencies
32+ run : go mod verify
33+ - name : Run go vet
34+ run : go vet ./...
35+ - name : Run tests
36+ run : go test -race -coverprofile=coverage.out -covermode=atomic ./...
37+
38+ lint :
39+ name : Lint
40+ runs-on : ubuntu-latest
41+ steps :
42+ - name : Check out code
43+ uses : actions/checkout@v4
44+ - name : Set up Go
45+ uses : actions/setup-go@v5
46+ with :
47+ go-version : ' 1.24.2'
48+ - name : Run golangci-lint
49+ uses : golangci/golangci-lint-action@v8
50+ with :
51+ version : latest
52+ args : --timeout=5m
You can’t perform that action at this time.
0 commit comments