Skip to content

Commit b0e3e05

Browse files
committed
fix: ci
1 parent 05f7e01 commit b0e3e05

File tree

2 files changed

+36
-37
lines changed

2 files changed

+36
-37
lines changed

.github/workflows/go.yml

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,50 @@ name: Go
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
7-
branches: [ master ]
7+
branches: [master]
88

99
jobs:
10-
1110
build:
1211
name: Build
1312
runs-on: ubuntu-latest
1413
steps:
15-
16-
- name: Set up Go 1.x
17-
uses: actions/setup-go@v4
18-
with:
19-
go-version: "1.x"
20-
id: go
21-
22-
- name: Check out code into the Go module directory
23-
uses: actions/checkout@v3
24-
25-
- name: Build
26-
run: go build -race -v ./...
27-
28-
- name: Test
29-
run: |
30-
go test -race -cover -coverprofile ./coverage.out.tmp ./...
31-
cat ./coverage.out.tmp | grep -v '.pb.go' | grep -v 'mock_' > ./coverage.out
32-
rm ./coverage.out.tmp
33-
34-
- name: Run golangci-lint
35-
uses: golangci/golangci-lint-action@v3
36-
with:
37-
version: v1.52.2
38-
39-
- name: Coveralls
40-
uses: shogo82148/actions-goveralls@v1
41-
with:
42-
path-to-profile: coverage.out
14+
- name: Set up Go 1.x
15+
uses: actions/setup-go@v4
16+
with:
17+
go-version: "1.x"
18+
id: go
19+
20+
- name: Check out code into the Go module directory
21+
uses: actions/checkout@v3
22+
23+
- name: Build
24+
run: go build -race -v ./...
25+
26+
- name: Test
27+
run: |
28+
go test -race -cover -coverprofile ./coverage.out.tmp ./...
29+
cat ./coverage.out.tmp | grep -v '.pb.go' | grep -v 'mock_' > ./coverage.out
30+
rm ./coverage.out.tmp
31+
32+
- name: Run golangci-lint
33+
uses: golangci/golangci-lint-action@v8
34+
with:
35+
version: latest
36+
skip-cache: true
37+
38+
- name: Coveralls
39+
uses: shogo82148/actions-goveralls@v1
40+
with:
41+
path-to-profile: coverage.out
4342

4443
finish:
4544
needs: build
4645
runs-on: ubuntu-latest
4746
steps:
48-
- name: Coveralls Finished
49-
uses: coverallsapp/github-action@master
50-
with:
51-
github-token: ${{ secrets.GITHUB_TOKEN }}
52-
parallel-finished: true
47+
- name: Coveralls Finished
48+
uses: coverallsapp/github-action@master
49+
with:
50+
github-token: ${{ secrets.GITHUB_TOKEN }}
51+
parallel-finished: true

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ test: coverage.out
1616
lint:
1717
ifeq (, $(shell which golangci-lint))
1818
@echo "Install golangci-lint..."
19-
@curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b ${GOPATH}/bin v1.41.1
19+
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.6.2
2020
endif
2121
@echo "lint..."
2222
@golangci-lint run --timeout=300s ./...

0 commit comments

Comments
 (0)