Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit 8af3a37

Browse files
committed
travis.yml: update to Go 1.12
Also fix the tests on tip, which broke because of the new Frames API for error objects.
1 parent dfac376 commit 8af3a37

File tree

17 files changed

+2402
-9
lines changed

17 files changed

+2402
-9
lines changed

.travis.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,26 @@ jobs:
1414
env:
1515
- DEPTESTBYPASS501=1
1616
- TZ=UTC
17+
- GOCACHE=/home/travis/var/cache
1718
os: linux
18-
go: 1.11.x
19+
go: 1.12.x
1920
script:
2021
- make validate test
2122
- ./hack/coverage.bash
2223
after_success:
2324
- codeclimate-test-reporter < coverage.txt
2425
# YAML alias, for settings shared across the simpler builds
2526
- &simple-test
26-
go: 1.10.x
27+
go: 1.11.x
2728
stage: test
2829
go_import_path: github.com/golang/dep
2930
install:
3031
- ssh-keyscan -t $TRAVIS_SSH_KEY_TYPES -H bitbucket.org >> ~/.ssh/known_hosts
3132
env:
3233
- DEPTESTBYPASS501=1
3334
- TZ=UTC
34-
script: make test
35+
script:
36+
- make test
3537
- <<: *simple-test
3638
go: 1.9.x
3739
- <<: *simple-test
@@ -46,7 +48,7 @@ jobs:
4648

4749
- <<: *simple-test
4850
os: osx
49-
go: 1.11.x
51+
go: 1.12.x
5052
install:
5153
# brew takes horribly long to update itself despite the above caching
5254
# attempt; only bzr install if it's not on the $PATH
@@ -56,6 +58,7 @@ jobs:
5658
- HOMEBREW_NO_AUTO_UPDATE=1
5759
- DEPTESTBYPASS501=1
5860
- TZ=UTC
61+
- GOCACHE=/Users/travis/var/cache
5962
script:
6063
# OSX as of El Capitan sets an exit trap that interacts poorly with how
6164
# travis seems to spawn these shells; if set -e is set, then it can cause
@@ -64,15 +67,16 @@ jobs:
6467
# Related: https://superuser.com/questions/1044130/why-am-i-having-how-can-i-fix-this-error-shell-session-update-command-not-f
6568
- trap EXIT
6669
- make test
67-
- go: 1.11.x
70+
- go: 1.12.x
6871
# Run on OS X so that we get a CGO-enabled binary for this OS; see
6972
# https://github.com/golang/dep/issues/1838 for more details.
7073
os: osx
7174
stage: deploy
7275
go_import_path: github.com/golang/dep
7376
install:
7477
- ssh-keyscan -t $TRAVIS_SSH_KEY_TYPES -H bitbucket.org >> ~/.ssh/known_hosts
75-
script: skip
78+
script:
79+
- skip
7680
before_deploy:
7781
- ./hack/build-all.bash
7882
deploy:

Gopkg.lock

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gps/pkgtree/pkgtree.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func ListPackages(fileRoot, importRoot string) (PackageTree, error) {
141141
if err != nil {
142142
switch err.(type) {
143143
case gscan.ErrorList, *gscan.Error, *build.NoGoError, *ConflictingImportComments:
144-
// Assorted cases in which we've encounter malformed or
144+
// Assorted cases in which we've encountered malformed or
145145
// nonexistent Go source code.
146146
ptree.Packages[ip] = PackageOrErr{
147147
Err: err,

gps/pkgtree/pkgtree_test.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/golang/dep/gps/paths"
2222
"github.com/golang/dep/internal/fs"
2323
_ "github.com/golang/dep/internal/test" // DO NOT REMOVE, allows go test ./... -update to work
24+
"github.com/google/go-cmp/cmp"
2425
)
2526

2627
// PackageTree.ToReachMap() uses an easily separable algorithm, wmToReach(),
@@ -546,11 +547,13 @@ func TestWorkmapToReach(t *testing.T) {
546547
}
547548

548549
rm, em := wmToReach(fix.workmap, fix.backprop)
549-
if !reflect.DeepEqual(rm, fix.rm) {
550+
if diff := cmp.Diff(rm, fix.rm); diff != "" {
550551
//t.Error(pretty.Sprintf("wmToReach(%q): Did not get expected reach map:\n\t(GOT): %s\n\t(WNT): %s", name, rm, fix.rm))
551552
t.Errorf("Did not get expected reach map:\n\t(GOT): %s\n\t(WNT): %s", rm, fix.rm)
552553
}
553-
if !reflect.DeepEqual(em, fix.em) {
554+
if diff := cmp.Diff(em, fix.em, cmp.Comparer(func(x error, y error) bool {
555+
return x.Error() == y.Error()
556+
})); diff != "" {
554557
//t.Error(pretty.Sprintf("wmToReach(%q): Did not get expected error map:\n\t(GOT): %# v\n\t(WNT): %# v", name, em, fix.em))
555558
t.Errorf("Did not get expected error map:\n\t(GOT): %v\n\t(WNT): %v", em, fix.em)
556559
}

vendor/github.com/google/go-cmp/LICENSE

+27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)