diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000000..8b9a3828ac3 --- /dev/null +++ b/.travis.yml @@ -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 diff --git a/Makefile b/Makefile index 6e8fb59f667..2fad9892b8c 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,8 @@ $(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: @@ -56,3 +57,5 @@ realclean: rm -f $(OPTIONS_GO) rm -f $(EXAMPLE_SVCSRCS) $(EXAMPLE_DEPSRCS) rm -f $(EXAMPLE_GWSRCS) + +.PHONY: generate examples test clean distclean realclean