Skip to content

Commit f805f23

Browse files
committed
Travis updates
- Add Go 1.17 - Fix go fmt from Go 1.17 (build directives) - Download version of misspell and staticcheck instead of doing "go get" since current staticcheck would be broken without go.mod Signed-off-by: Ivan Kozlovic <[email protected]>
1 parent 2c53e97 commit f805f23

25 files changed

+30
-10
lines changed

.travis.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ vm:
77

88
language: go
99
go:
10+
- 1.17.x
1011
- 1.16.x
11-
- 1.15.x
1212
addons:
1313
apt:
1414
packages:
@@ -17,11 +17,8 @@ env:
1717
- GO111MODULE=off
1818
go_import_path: github.com/nats-io/nats-server
1919
install:
20-
- go get github.com/nats-io/nats.go/
21-
- go get github.com/nats-io/nkeys
22-
- go get github.com/nats-io/jwt
23-
- go get -u honnef.co/go/tools/cmd/staticcheck
24-
- go get -u github.com/client9/misspell/cmd/misspell
20+
- GO111MODULE=on go get honnef.co/go/tools/cmd/[email protected]
21+
- GO111MODULE=on go get github.com/client9/misspell/cmd/[email protected]
2522
before_script:
2623
- GO_LIST=$(go list ./...)
2724
- go build
@@ -33,10 +30,10 @@ script:
3330
- set -e
3431
- if [[ $TRAVIS_TAG ]]; then go test -v -run=TestVersionMatchesTag ./server; fi
3532
- if [[ ! $TRAVIS_TAG ]]; then go test -v -run=TestNoRace --failfast -p=1 -timeout 20m ./...; fi
36-
- if [[ ! $TRAVIS_TAG ]]; then if [[ "$TRAVIS_GO_VERSION" =~ 1.15 ]]; then ./scripts/cov.sh TRAVIS; else go test -v -race -p=1 --failfast -timeout 20m ./...; fi; fi
33+
- if [[ ! $TRAVIS_TAG ]]; then if [[ "$TRAVIS_GO_VERSION" =~ 1.16 ]]; then ./scripts/cov.sh TRAVIS; else go test -v -race -p=1 --failfast -timeout 20m ./...; fi; fi
3734
- set +e
3835
after_success:
39-
- if [[ ! $TRAVIS_TAG ]]; then if [[ "$TRAVIS_GO_VERSION" =~ 1.15 ]]; then $HOME/gopath/bin/goveralls -coverprofile=acc.out -service travis-ci; fi; fi
36+
- if [[ ! $TRAVIS_TAG ]]; then if [[ "$TRAVIS_GO_VERSION" =~ 1.16 ]]; then $HOME/gopath/bin/goveralls -coverprofile=acc.out -service travis-ci; fi; fi
4037

4138
deploy:
4239
provider: script

conf/fuzz.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build gofuzz
1415
// +build gofuzz
1516

1617
package conf

logger/syslog.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build !windows
1415
// +build !windows
1516

1617
package logger

logger/syslog_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build !windows
1415
// +build !windows
1516

1617
package logger

logger/syslog_windows_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build windows
1415
// +build windows
1516

1617
package logger

server/disk_avail.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14-
// +build !windows
15-
// +build !openbsd
14+
//go:build !windows && !openbsd
15+
// +build !windows,!openbsd
1616

1717
package server
1818

server/disk_avail_openbsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build openbsd
1415
// +build openbsd
1516

1617
package server

server/disk_avail_windows.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build windows
1415
// +build windows
1516

1617
package server

server/fuzz.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build gofuzz
1415
// +build gofuzz
1516

1617
package server

server/norace_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build !race
1415
// +build !race
1516

1617
package server

server/pse/pse_freebsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build !amd64
1415
// +build !amd64
1516

1617
package pse

server/pse/pse_rumprun.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build rumprun
1415
// +build rumprun
1516

1617
package pse

server/pse/pse_windows.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build windows
1415
// +build windows
1516

1617
package pse

server/pse/pse_windows_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build windows
1415
// +build windows
1516

1617
package pse

server/service.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build !windows
1415
// +build !windows
1516

1617
package server

server/service_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build !windows
1415
// +build !windows
1516

1617
package server

server/signal.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build !windows
1415
// +build !windows
1516

1617
package server

server/signal_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build !windows
1415
// +build !windows
1516

1617
package server

server/sysmem/mem_bsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build freebsd || openbsd || dragonfly || netbsd
1415
// +build freebsd openbsd dragonfly netbsd
1516

1617
package sysmem

server/sysmem/mem_darwin.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build darwin
1415
// +build darwin
1516

1617
package sysmem

server/sysmem/mem_linux.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build linux
1415
// +build linux
1516

1617
package sysmem

server/sysmem/mem_windows.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build windows
1415
// +build windows
1516

1617
package sysmem

server/sysmem/sysctl.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build darwin || freebsd || openbsd || dragonfly || netbsd
1415
// +build darwin freebsd openbsd dragonfly netbsd
1516

1617
package sysmem

test/fanout_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build !race
1415
// +build !race
1516

1617
package test

test/norace_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build !race
1415
// +build !race
1516

1617
package test

0 commit comments

Comments
 (0)