From 664498d53d24a5a7cb04f20343630fd2c8120481 Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Mon, 12 Dec 2016 19:23:47 +0100 Subject: [PATCH] Setup unit tests (fix #13) --- .gitignore | 2 ++ .travis.yml | 12 ++++++++++++ Makefile | 11 +++++++++++ 3 files changed, 25 insertions(+) create mode 100644 .travis.yml create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index daf913b..a07ca9c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +/protoc-gen-gotemplate + # Compiled Object files, Static and Dynamic libs (Shared Objects) *.o *.a diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e53bf7b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +language: go +go: 1.7.x +install: wget https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/master/.travis/install-protoc.sh && chmod +x install-protoc.sh && ./install-protoc.sh 3.1.0 +script: +- make install +- make test +cache: + directories: + - $HOME/local +env: + global: + - "PATH=$PATH:$HOME/local/bin" \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fa36a7e --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +.PHONY: build +build: + go build -o protoc-gen-gotemplate . + +.PHONY: install +install: + go install . + +.PHONY: test +test: build + cd examples/dummy && make