File tree Expand file tree Collapse file tree 3 files changed +64
-0
lines changed Expand file tree Collapse file tree 3 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ name : golangci-lint
2+ on :
3+ push :
4+ tags :
5+ - v*
6+ branches :
7+ - main
8+ pull_request :
9+ jobs :
10+ golangci :
11+ name : lint
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v2
15+ - name : golangci-lint
16+ uses : golangci/golangci-lint-action@v2
17+ with :
18+ version : v1.42.1
Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ branches :
4+ - main
5+ pull_request :
6+ branches :
7+ - main
8+ name : Test
9+ jobs :
10+ test :
11+ strategy :
12+ matrix :
13+ go-version : [1.16.x, 1.17.x]
14+ os : [ubuntu-latest, macos-latest, windows-latest]
15+ runs-on : ${{ matrix.os }}
16+ steps :
17+ - name : Install Go
18+ uses : actions/setup-go@v2
19+ with :
20+ go-version : ${{ matrix.go-version }}
21+ - name : Checkout code
22+ uses : actions/checkout@v2
23+ - uses : actions/cache@v2
24+ with :
25+ path : |
26+ ~/go/pkg/mod
27+ ~/.cache/go-build
28+ ~/Library/Caches/go-build
29+ %LocalAppData%\go-build
30+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
31+ restore-keys : |
32+ ${{ runner.os }}-go-
33+ - name : Test CGO free
34+ run : make check-cgo-free
35+ - name : Test
36+ run : make test
Original file line number Diff line number Diff line change 1+ GO_FLAGS=CGO_ENABLED =0
2+
3+ check-cgo-free :
4+ $(GO_FLAGS ) go build ./...
5+ .PHONY : check-cgo-free
6+
7+ test :
8+ go test ./... -race
9+ .PHONY : test
10+
You can’t perform that action at this time.
0 commit comments