Skip to content

Commit 654f7f7

Browse files
committed
.travis.yml: speed up tests on Travis
This should decrease test runtime to about 30 seconds.
1 parent 66abe2e commit 654f7f7

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ install:
1111
# - go get golang.org/x/tools/cmd/vet
1212
- if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
1313
- go get github.com/mattn/goveralls
14-
- go get gopkg.in/check.v1
15-
- go get github.com/tools/godep
1614
before_script:
17-
- godep restore
1815
- gofmt -l -w .
1916
- goimports -l -w .
2017
- golint .

gocoverage.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
#!/bin/bash
2-
# The script does automatic checking on a Go package and its sub-packages, including:
3-
# 6. test coverage (http://blog.golang.org/cover)
42

53
set -e
64

7-
# Run test coverage on each subdirectories and merge the coverage profile.
5+
# Add godep workspace to GOPATH. We do it manually instead of using
6+
# 'godep go test' or 'godep restore' so godep doesn't need to be installed.
7+
GOPATH="$PWD/Godeps/_workspace:$GOPATH"
8+
9+
# Install packages before testing. Not doing this would cause
10+
# 'go test' to recompile all package dependencies before testing each package.
11+
go install ./...
812

13+
# Run test coverage on each subdirectories and merge the coverage profile.
914
echo "mode: count" > profile.cov
1015

1116
# Standard go tooling behavior is to ignore dirs with leading underscors

0 commit comments

Comments
 (0)