File tree Expand file tree Collapse file tree 3 files changed +16
-42
lines changed Expand file tree Collapse file tree 3 files changed +16
-42
lines changed Original file line number Diff line number Diff line change 66
77name : Test
88jobs :
9- lint :
10- name : Lint
9+ golangci :
10+ name : lint
1111 runs-on : ubuntu-latest
1212 steps :
13- - name : Check out code
14- uses : actions/checkout@v2
15-
16- - name : Run linter
17- uses : golangci/golangci-lint-action@v2
13+ - uses : actions/setup-go@v3
14+ with :
15+ go-version : 1.20.x
16+ - uses : actions/checkout@v3
17+ - name : golangci-lint
18+ uses : golangci/golangci-lint-action@v3
1819 with :
19- version : v1.35.2
20+ version : latest
2021
2122 test :
2223 name : Test
2324 strategy :
2425 matrix :
25- go-version : [1.14 .x, 1.15 .x]
26+ go-version : [1.17 .x, 1.18.x, 1.20 .x]
2627 os : [ubuntu-latest, macos-latest]
2728 runs-on : ${{ matrix.os }}
2829 steps :
2930 - name : Install Go
30- uses : actions/setup-go@v2
31+ uses : actions/setup-go@v3
3132 with :
3233 go-version : ${{ matrix.go-version }}
3334
3435 - name : Checkout code
35- uses : actions/checkout@v2
36+ uses : actions/checkout@v3
3637
3738 - name : Restore cache
38- uses : actions/cache@v2
39+ uses : actions/cache@v3
3940 with :
4041 path : ~/go/pkg/mod
4142 key : ${{ runner.os }}-v1-go-${{ hashFiles('**/go.sum') }}
4647 run : go test -race -covermode=atomic -coverprofile="coverage.out" ./...
4748
4849 - name : Upload coverage report to Coveralls
49- if : matrix.os == 'ubuntu-latest' && matrix.go-version == '1.15 .x'
50+ if : matrix.os == 'ubuntu-latest' && matrix.go-version == '1.18 .x'
5051 uses : shogo82148/actions-goveralls@v1
5152 with :
5253 path-to-profile : coverage.out
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- GOPATH =$(shell go env GOPATH)
2-
31all : lint test
42
5- linters-install :
6- @echo " + $@ "
7- @$(GOPATH ) /bin/golangci-lint --version > /dev/null 2>&1 || { \
8- echo "Install golangci-lint..."; \
9- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin; \
10- }
11-
123lint : linters-install
13- @echo " + $@ "
14- $(GOPATH ) /bin/golangci-lint run ./...
4+ golangci-lint run --timeout 5m
155
166test :
17- @echo " + $@ "
18- GO111MODULE=on go test -covermode=atomic -race ./...
7+ go test -covermode=atomic -race ./...
198
209.PHONY : test lint linters-install
2110.DEFAULT_GOAL := all
You can’t perform that action at this time.
0 commit comments