diff --git a/.github/actions/nightly-release/action.yaml b/.github/actions/nightly-release/action.yaml index 7fab7dd6..2849702b 100644 --- a/.github/actions/nightly-release/action.yaml +++ b/.github/actions/nightly-release/action.yaml @@ -26,7 +26,7 @@ runs: using: composite steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: "${{ inputs.go }}" diff --git a/.github/workflows/cov.yaml b/.github/workflows/cov.yaml index d878f62f..39134dd2 100644 --- a/.github/workflows/cov.yaml +++ b/.github/workflows/cov.yaml @@ -21,9 +21,9 @@ jobs: ref: dev - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: 1.19.x + go-version: "1.20.x" - name: Run code coverage shell: bash --noprofile --norc -x -eo pipefail {0} diff --git a/.github/workflows/go-test.yaml b/.github/workflows/go-test.yaml index bac6c719..d3dbae9d 100644 --- a/.github/workflows/go-test.yaml +++ b/.github/workflows/go-test.yaml @@ -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/golangci-lint@v1.53.3 - 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} diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 61433fe2..8f2462eb 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -22,7 +22,7 @@ jobs: - uses: ./src/github.com/nats-io/nats-server/.github/actions/nightly-release with: - go: "1.19" + go: "1.20" workdir: src/github.com/nats-io/nats-server label: nightly hub_username: "${{ secrets.DOCKER_USERNAME }}" diff --git a/.github/workflows/rc_nightly.yaml b/.github/workflows/rc_nightly.yaml index 2228e226..f6cf6bc7 100644 --- a/.github/workflows/rc_nightly.yaml +++ b/.github/workflows/rc_nightly.yaml @@ -22,7 +22,7 @@ jobs: - uses: ./src/github.com/nats-io/nats-server/.github/actions/nightly-release with: - go: "1.19" + go: "1.20" workdir: src/github.com/nats-io/nats-server label: nightly-main hub_username: "${{ secrets.DOCKER_USERNAME }}" diff --git a/.travis.yml b/.travis.yml index 75e7d2b1..2592c26f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,9 @@ vm: language: go go: + - "1.20.x" - "1.19.12" + go_import_path: github.com/nats-io/nats-server addons: @@ -48,4 +50,4 @@ deploy: script: curl -sL http://git.io/goreleaser | bash on: tags: true - condition: ($TRAVIS_GO_VERSION =~ 1.19) && ($TEST_SUITE = "compile") + condition: ($TRAVIS_GO_VERSION =~ 1.20) && ($TEST_SUITE = "compile") diff --git a/docker/Dockerfile.nightly b/docker/Dockerfile.nightly index 87f6d950..aa2ade34 100644 --- a/docker/Dockerfile.nightly +++ b/docker/Dockerfile.nightly @@ -1,4 +1,4 @@ -FROM golang:1.19-alpine AS builder +FROM golang:1.20-alpine AS builder ARG VERSION="nightly" diff --git a/scripts/runTestsOnTravis.sh b/scripts/runTestsOnTravis.sh index eb21304f..53961a5b 100755 --- a/scripts/runTestsOnTravis.sh +++ b/scripts/runTestsOnTravis.sh @@ -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/golangci-lint@v1.53.3; golangci-lint run; if [ "$TRAVIS_TAG" != "" ]; then go test -race -v -run=TestVersionMatchesTag ./server -count=1 -vet=off