Skip to content

Commit

Permalink
Configure travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
yugui committed May 9, 2015
1 parent 4747d51 commit 9c1732e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: go

go:
- 1.3
- tip
before_install:
- cd /tmp
- wget https://github.com/google/protobuf/archive/v3.0.0-alpha-2.tar.gz
- tar xvzf v3.0.0-alpha-2.tar.gz
- cd protobuf-3.0.0-alpha-2
- ./autogen.sh
- ./configure
- make
- sudo make install
- go get github.com/golang/lint/golint
- go get golang.org/x/tools/cmd/vet
install:
- go get github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway
script:
- make examples
- test -z "$(git -C $GOPATH/src/github.com/gengo/grpc-gateway status --porcelain)"
- go test -v github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway/... --logtostderr
- golint github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway
- golint github.com/gengo/grpc-gateway/runtime
- go tool vet $GOPATH/src/github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway
- go tool vet $GOPATH/src/github.com/gengo/grpc-gateway/runtime
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,14 @@ $(EXAMPLE_DEPSRCS): $(GO_PLUGIN) $(EXAMPLE_DEPS)
$(EXAMPLE_GWSRCS): $(GATEWAY_PLUGIN) $(EXAMPLES)
protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GATEWAY_PLUGIN) --grpc-gateway_out=logtostderr=true,$(PKGMAP):. $(EXAMPLES)

test: $(EXAMPLE_SVCSRCS) $(EXAMPLE_GWSRCS) $(EXAMPLE_DEPSRCS)
examples: $(EXAMPLE_SVCSRCS) $(EXAMPLE_GWSRCS) $(EXAMPLE_DEPSRCS)
test: examples
go test $(PKG)/...

clean distclean:
realclean:
rm -f $(OPTIONS_GO)
rm -f $(EXAMPLE_SVCSRCS) $(EXAMPLE_DEPSRCS)
rm -f $(EXAMPLE_GWSRCS)

.PHONY: generate examples test clean distclean realclean
4 changes: 2 additions & 2 deletions protoc-gen-grpc-gateway/descriptor/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestLoadFile(t *testing.T) {

msg, err := reg.LookupMsg("", ".example.ExampleMessage")
if err != nil {
t.Errorf("reg.LookupMsg(%q, %q)) failed with %v; want success", "", ".example.ExampleMessage", "", ".example.ExampleMessage", err)
t.Errorf("reg.LookupMsg(%q, %q)) failed with %v; want success", "", ".example.ExampleMessage", err)
return
}
if got, want := msg.DescriptorProto, fd.MessageType[0]; got != want {
Expand Down Expand Up @@ -263,7 +263,7 @@ func TestLookupMsgWithoutPackage(t *testing.T) {

msg, err := reg.LookupMsg("", ".ExampleMessage")
if err != nil {
t.Errorf("reg.LookupMsg(%q, %q)) failed with %v; want success", "", ".ExampleMessage")
t.Errorf("reg.LookupMsg(%q, %q)) failed with %v; want success", "", ".ExampleMessage", err)
return
}
if got, want := msg.DescriptorProto, fd.MessageType[0]; got != want {
Expand Down

0 comments on commit 9c1732e

Please sign in to comment.