Skip to content

Commit

Permalink
Merge pull request PagerDuty#1 from heimweh/fix-tests
Browse files Browse the repository at this point in the history
Fix tests and add travis support
  • Loading branch information
heimweh authored Jun 26, 2017
2 parents a458ce4 + daad3a6 commit b5746db
Show file tree
Hide file tree
Showing 6 changed files with 389 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
dist: trusty
sudo: false
language: go
go:
- 1.8.1

install:
# This script is used by the Travis build to install a cookie for
# go.googlesource.com so rate limits are higher when using `go get` to fetch
# packages that live there.
# See: https://github.com/golang/go/issues/12933
- bash scripts/gogetcookie.sh
- go get github.com/kardianos/govendor

script:
- make test

branches:
only:
- master
matrix:
fast_finish: true
allow_failures:
- go: tip
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ tools:
go get -u github.com/client9/misspell/cmd/misspell
go get -u github.com/golang/lint/golint

vendor-status:
@govendor status

coverprofile:
@go test ./pagerduty/... -coverprofile coverage.out && go tool cover -html=coverage.out

Expand All @@ -29,7 +32,7 @@ lint:
@echo -e "$(OK_MSG)"

# check combines all checks into a single command
check: fmtcheck vet misspell staticcheck simple unused lint checkdoc
check: fmtcheck vet misspell staticcheck simple unused lint vendor-status

# fmt formats Go code.
fmt:
Expand Down
1 change: 1 addition & 0 deletions pagerduty/references.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type resourceReference struct {
Type string `json:"type,omitempty"`
}

// UserReferenceWrapper is a wrapper around UserReference
type UserReferenceWrapper struct {
User *UserReference `json:"user,omitempty"`
}
Expand Down
27 changes: 27 additions & 0 deletions vendor/github.com/google/go-querystring/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b5746db

Please sign in to comment.