Skip to content

Commit

Permalink
Specify every package expliclity for test to exclude main.go
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-soltesz committed Feb 10, 2020
1 parent 2b2974a commit 858427d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ script:
- source "${HOME}/google-cloud-sdk/path.bash.inc"

# Run all tests and gather and submit coverage information.
- GCLOUD_PROJECT=mlab-testing go test -v -coverpkg=./... -coverprofile=coverage.cov ./...
# - GCLOUD_PROJECT=mlab-testing go test -v -coverpkg=./... -coverprofile=coverage.cov ./...
# Exclude main.go from tests to prevent "duplicate main.init.0" errors.
- GCLOUD_PROJECT=mlab-testing go test -v -coverpkg=./... -coverprofile=coverage.cov ./asn/... ./legacy/... ./handler/... ./metrics/... ./geoloader/... ./manager/... ./geolite2v2/... ./api/... ./loader/... ./directory/... ./iputils/...

- $HOME/gopath/bin/goveralls -coverprofile=coverage.cov -service=travis-ci
# Run benchmarks
- go test -bench . ./geolite2v2/...
Expand Down

0 comments on commit 858427d

Please sign in to comment.