-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.9.x: Change CI and nightlies to use Go 1.20 (#4487)
Includes fix for test `TestGatewayTLSMixedIPAndDNS ` that was breaking in Go 1.20.
- Loading branch information
Showing
10 changed files
with
101 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,7 @@ jobs: | |
test: | ||
strategy: | ||
matrix: | ||
go: [1.16] | ||
|
||
go: ["1.20"] | ||
env: | ||
GOPATH: /home/runner/work/nats-server | ||
GO111MODULE: "on" | ||
|
@@ -19,25 +18,19 @@ jobs: | |
path: src/github.com/nats-io/nats-server | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{matrix.go}} | ||
|
||
- name: Install deps | ||
shell: bash --noprofile --norc -x -eo pipefail {0} | ||
run: | | ||
go get -u honnef.co/go/tools/cmd/staticcheck | ||
go get -u github.com/client9/misspell/cmd/misspell | ||
go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
- name: Lint | ||
shell: bash --noprofile --norc -x -eo pipefail {0} | ||
run: | | ||
GO_LIST=$(go list ./...) | ||
go build | ||
$(exit $(go fmt $GO_LIST | wc -l)) | ||
go vet $GO_LIST | ||
find . -type f -name "*.go" | xargs $GOPATH/bin/misspell -error -locale US | ||
$GOPATH/bin/staticcheck $GO_LIST | ||
golangci-lint run | ||
- name: Run tests | ||
shell: bash --noprofile --norc -x -eo pipefail {0} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.19-alpine AS builder | ||
FROM golang:1.20-alpine AS builder | ||
|
||
ARG VERSION="nightly" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,7 @@ if [ "$1" = "compile" ]; then | |
go build; | ||
|
||
# Now run the linters. | ||
# TODO: Pinning a specific commit here as there is a bugfix merged that | ||
# fixes gofmt on macOS Ventura, we can undo this and go back to the binary | ||
# install script once there's a new tagged release that contains the fix. | ||
# curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1 | ||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@6f7f8ae; | ||
go install github.com/golangci/golangci-lint/cmd/[email protected]; | ||
golangci-lint run; | ||
if [ "$TRAVIS_TAG" != "" ]; then | ||
go test -race -v -run=TestVersionMatchesTag ./server -count=1 -vet=off | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters