Use Go 1.21 for nightlies, Dockerfile, code coverage, bump go.mod version to Go 1.20

Signed-off-by: Neil Twigg <neil@nats.io>
This commit is contained in:
Neil Twigg
2023-08-31 09:00:29 +01:00
parent ee4c04dec4
commit d08eeee94d
7 changed files with 10 additions and 10 deletions

View File

@@ -23,7 +23,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v4 uses: actions/setup-go@v4
with: with:
go-version: "1.20.x" go-version: "1.21.x"
- name: Run code coverage - name: Run code coverage
shell: bash --noprofile --norc -x -eo pipefail {0} shell: bash --noprofile --norc -x -eo pipefail {0}

View File

@@ -5,7 +5,7 @@ jobs:
test: test:
strategy: strategy:
matrix: matrix:
go: ["1.20"] go: ["1.21"]
env: env:
GOPATH: /home/runner/work/nats-server GOPATH: /home/runner/work/nats-server

View File

@@ -22,7 +22,7 @@ jobs:
- uses: ./src/github.com/nats-io/nats-server/.github/actions/nightly-release - uses: ./src/github.com/nats-io/nats-server/.github/actions/nightly-release
with: with:
go: "1.20" go: "1.21"
workdir: src/github.com/nats-io/nats-server workdir: src/github.com/nats-io/nats-server
label: nightly label: nightly
hub_username: "${{ secrets.DOCKER_USERNAME }}" hub_username: "${{ secrets.DOCKER_USERNAME }}"

View File

@@ -22,7 +22,7 @@ jobs:
- uses: ./src/github.com/nats-io/nats-server/.github/actions/nightly-release - uses: ./src/github.com/nats-io/nats-server/.github/actions/nightly-release
with: with:
go: "1.20" go: "1.21"
workdir: src/github.com/nats-io/nats-server workdir: src/github.com/nats-io/nats-server
label: nightly-main label: nightly-main
hub_username: "${{ secrets.DOCKER_USERNAME }}" hub_username: "${{ secrets.DOCKER_USERNAME }}"

View File

@@ -6,8 +6,8 @@ vm:
language: go language: go
go: go:
# This should be quoted or use .x, but should not be unquoted. # This should be quoted or use .x, but should not be unquoted.
# Remember that a YAML bare float drops trailing zeroes. # Remember that a YAML bare float drops trailing zeroes.
- "1.21.x" - "1.21.x"
- "1.20.x" - "1.20.x"
@@ -41,7 +41,7 @@ jobs:
- name: "Run all tests from all other packages" - name: "Run all tests from all other packages"
env: TEST_SUITE=non_srv_pkg_tests env: TEST_SUITE=non_srv_pkg_tests
- name: "Compile with older Go release" - name: "Compile with older Go release"
go: "1.19.12" go: "1.20"
env: TEST_SUITE=build_only env: TEST_SUITE=build_only
script: ./scripts/runTestsOnTravis.sh $TEST_SUITE script: ./scripts/runTestsOnTravis.sh $TEST_SUITE
@@ -52,4 +52,4 @@ deploy:
script: curl -sL http://git.io/goreleaser | bash script: curl -sL http://git.io/goreleaser | bash
on: on:
tags: true tags: true
condition: ($TRAVIS_GO_VERSION =~ 1.20) && ($TEST_SUITE = "compile") condition: ($TRAVIS_GO_VERSION =~ 1.21) && ($TEST_SUITE = "compile")

View File

@@ -1,4 +1,4 @@
FROM golang:1.20-alpine AS builder FROM golang:1.21-alpine AS builder
ARG VERSION="nightly" ARG VERSION="nightly"

2
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/nats-io/nats-server/v2 module github.com/nats-io/nats-server/v2
go 1.19 go 1.20
require ( require (
github.com/klauspost/compress v1.16.7 github.com/klauspost/compress v1.16.7