Skip to content

github: add Go 1.23 testing and make staticcheck work locally with go1.23 #7751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache-dependency-path: "**/go.sum"

# Run the vet-proto checks.
Expand All @@ -46,32 +46,32 @@ jobs:
goversion: '1.22'

- type: extras
goversion: '1.22'
goversion: '1.23'

- type: tests
goversion: '1.22'
goversion: '1.23'

- type: tests
goversion: '1.22'
goversion: '1.23'
testflags: -race

- type: tests
goversion: '1.22'
goversion: '1.23'
testflags: '-race -tags=buffer_pooling'

- type: tests
goversion: '1.22'
goversion: '1.23'
goarch: 386

- type: tests
goversion: '1.22'
goversion: '1.23'
goarch: arm64

- type: tests
goversion: '1.21'
goversion: '1.22'

- type: tests
goversion: '1.22'
goversion: '1.23'
testflags: -race
grpcenv: 'GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST=true'

Expand Down
8 changes: 7 additions & 1 deletion scripts/vet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ for MOD_FILE in $(find . -name 'go.mod'); do

# - Collection of static analysis checks
SC_OUT="$(mktemp)"
staticcheck -go 1.22 -checks 'all' ./... >"${SC_OUT}" || true
# By default, Staticcheck targets the Go version declared in go.mod via the go
# directive. For Go 1.21 and newer, that directive specifies the minimum
# required version of Go.
# If a version is provided to Staticcheck using the -go flag, and the go
# toolchain version is higher than the one in go.mod, Staticcheck will report
# errors for usages of new language features in the std lib code.
staticcheck -checks 'all' ./... >"${SC_OUT}" || true

# Error for anything other than checks that need exclusions.
noret_grep -v "(ST1000)" "${SC_OUT}" | noret_grep -v "(SA1019)" | noret_grep -v "(ST1003)" | noret_grep -v "(ST1019)\|\(other import of\)" | not grep -v "(SA4000)"
Expand Down