Merge pull request #14 from moul/dev/moul/add-travis

Setup unit tests (fix #13)
This commit is contained in:
Manfred Touron 2016-12-12 19:37:03 +01:00 committed by GitHub
commit 09a9873bad
3 changed files with 25 additions and 0 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
/protoc-gen-gotemplate
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a

12
.travis.yml Normal file
View File

@ -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"

11
Makefile Normal file
View File

@ -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