ci: update go version (#936)

* ci: update go version

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* fix test

Signed-off-by: crazycs520 <crazycs520@gmail.com>

---------

Signed-off-by: crazycs520 <crazycs520@gmail.com>
This commit is contained in:
crazycs 2023-08-10 22:05:00 +08:00 committed by GitHub
parent 300545a8a3
commit 27f2ad0f3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 8 deletions

View File

@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20.x"
go-version: "1.21.0"
- name: Checkout Client-Go
uses: actions/checkout@v2

View File

@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.2
go-version: 1.21.0
- name: Test
run: go test ./...
@ -32,7 +32,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.2
go-version: 1.21.0
- name: Test
run: go test ./... -race
@ -47,7 +47,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.2
go-version: 1.21.0
- name: Fetch PD
uses: shrink/actions-docker-extract@v1
@ -89,7 +89,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.2
go-version: 1.21.0
- name: Fetch PD
uses: shrink/actions-docker-extract@v1

View File

@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.2
go-version: 1.21.0
- name: Test
run: go test ./...
@ -28,7 +28,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.2
go-version: 1.21.0
- name: Test with race
run: go test -race ./...
@ -42,7 +42,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.2
go-version: 1.21.0
- name: Lint
uses: golangci/golangci-lint-action@v3

View File

@ -26,6 +26,7 @@ func TestMain(m *testing.M) {
opts := []goleak.Option{
goleak.IgnoreTopFunction("google.golang.org/grpc.(*ClientConn).WaitForStateChange"),
goleak.IgnoreTopFunction("github.com/tikv/client-go/v2/internal/retry.newBackoffFn.func1"),
goleak.IgnoreTopFunction("github.com/tikv/client-go/v2/internal/retry.(*Config).createBackoffFn.newBackoffFn.func2"),
}
goleak.VerifyTestMain(m, opts...)
}