Merge pull request #36 from hasAdamr/travis

Add travis-ci for automated testing
This commit is contained in:
Adam Ryman 2016-08-22 18:48:33 -07:00 коммит произвёл GitHub
Родитель 1b3cb482dd b4e8a821a7
Коммит 89426bcc85
3 изменённых файлов: 65 добавлений и 1 удалений

54
.travis.yml Normal file
Просмотреть файл

@ -0,0 +1,54 @@
language: go
# use containers which run faster and have cache
sudo: false
# cache protobuf
cache:
directories:
- $HOME/protobuf
go:
- 1.7
- 1.6
go_import_path: github.com/TuneLab/go-truss
before_install:
# protobuf
- bash ./.travis/install-protobuf.sh
- export PATH=$HOME/protobuf/bin/:$PATH
# golang/protobuf contains protoc-gen-go which generates the .pb.go files
- go get github.com/golang/protobuf/...
# go-bindata is used to create binary data from template files
- go get github.com/jteeuwen/go-bindata/...
# vendor this?
- go get github.com/davecgh/go-spew/...
# used in ./gengokit/httptransport/templates_test.go
- go get github.com/pmezard/go-difflib/...
# these were added because when truss runs its $ go get ... after generating a microservice
# truss failed, the output seemed git related. This should be dealt with.
- go get -u google.golang.org/grpc
- go get -u golang.org/x/net/context
- go get -u github.com/go-kit/kit/...
# generate template binary data from template files
- go generate ./...
install:
# install our protoc plugin and truss
- go get github.com/TuneLab/go-truss/protoc-gen-truss-protocast/...
- go get github.com/TuneLab/go-truss/truss/...
script:
# The tests are spelled out as to not test the ./vendor directory
- go test -v ./gendoc/...
- go test -v ./gengokit/...
- go test -v ./truss/...
- go test -v -tags=integration ./truss/...
notifications:
email: false

Просмотреть файл

@ -0,0 +1,10 @@
#!/bin/sh
set -e
# check to see if protobuf folder is empty
if [ ! -d "$HOME/protobuf/lib" ]; then
wget https://github.com/google/protobuf/archive/v3.0.0.tar.gz
tar -xzvf v3.0.0.tar.gz
cd protobuf-3.0.0 && ./autogen.sh && ./configure --prefix=$HOME/protobuf && make && make install
else
echo "Using cached directory."
fi

Просмотреть файл

@ -1,4 +1,4 @@
# Truss
# Truss[![Build Status](https://travis-ci.org/hasAdamr/go-truss.svg?branch=travis)](https://travis-ci.org/hasAdamr/go-truss)
Truss handles the painful parts of microservices, freeing you to focus on the business logic.