Setup unit tests (fix #13)

This commit is contained in:
Manfred Touron 2016-12-12 19:23:47 +01:00
parent 1146013b1f
commit 664498d53d
No known key found for this signature in database
GPG Key ID: 9CCF47DF1FD978A1
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