Skip to content

Commit bcaf977

Browse files
travis: Test with Go 1.10 (#764)
* travis: Test with Go 1.10 * travis: check gofmt only with go1.10+
1 parent e8153fb commit bcaf977

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.travis.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ go:
44
- 1.7.x
55
- 1.8.x
66
- 1.9.x
7+
- 1.10.x
78
- master
89

910
before_install:
@@ -21,7 +22,7 @@ matrix:
2122
- env: DB=MYSQL57
2223
sudo: required
2324
dist: trusty
24-
go: 1.9.x
25+
go: 1.10.x
2526
services:
2627
- docker
2728
before_install:
@@ -43,7 +44,7 @@ matrix:
4344
- env: DB=MARIA55
4445
sudo: required
4546
dist: trusty
46-
go: 1.9.x
47+
go: 1.10.x
4748
services:
4849
- docker
4950
before_install:
@@ -65,7 +66,7 @@ matrix:
6566
- env: DB=MARIA10_1
6667
sudo: required
6768
dist: trusty
68-
go: 1.9.x
69+
go: 1.10.x
6970
services:
7071
- docker
7172
before_install:
@@ -87,6 +88,6 @@ matrix:
8788
script:
8889
- go test -v -covermode=count -coverprofile=coverage.out
8990
- go vet ./...
90-
- test -z "$(gofmt -d -s . | tee /dev/stderr)"
91+
- .travis/gofmt.sh
9192
after_script:
9293
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci

.travis/gofmt.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
set -ev
3+
4+
# Only check for go1.10+ since the gofmt style changed
5+
if [[ $(go version) =~ go1\.([0-9]+) ]] && ((${BASH_REMATCH[1]} >= 10)); then
6+
test -z "$(gofmt -d -s . | tee /dev/stderr)"
7+
fi

0 commit comments

Comments
 (0)