branches:
  only:
    - master
language: go
sudo: false
go:
- 1.6.2
- tip
cache:
  directories:
  - $HOME/local
before_install:
- ./.travis/build-protoc.sh 3.0.0-beta-3
- ./.travis/install-swagger-codegen.sh 2.1.6
- go get github.com/golang/lint/golint
- go get github.com/dghubble/sling
install:
- go get github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway
- go get github.com/gengo/grpc-gateway/runtime
- go get github.com/gengo/grpc-gateway/examples
- go get github.com/gengo/grpc-gateway/examples/server
script:
- make realclean && make examples SWAGGER_CODEGEN="java -jar $HOME/local/swagger-codegen-cli.jar"
- if ! go version | grep devel; then test -z "$(git status --porcelain)" || (git status; git diff; exit 1); fi
- env GLOG_logtostderr=1 go test -race -v github.com/gengo/grpc-gateway/...
- make lint
env:
  global:
  - "PATH=$PATH:$HOME/local/bin"

branches:
  only:
    - master
language: go
sudo: false
go:
- 1.6.2
- tip
cache:
  directories:
  - $HOME/local
  - ${TRAVIS_BUILD_DIR}/examples/browser/node_modules
before_install:
- ./.travis/build-protoc.sh 3.0.0-beta-3
- ./.travis/install-swagger-codegen.sh 2.1.6
- nvm install v6.1 && nvm use v6.1 && node --version
- go get github.com/golang/lint/golint
- go get github.com/dghubble/sling
install:
- go get github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway
- go get github.com/gengo/grpc-gateway/runtime
- go get github.com/gengo/grpc-gateway/examples
- go get github.com/gengo/grpc-gateway/examples/server
before_script:
- sh -c 'cd examples/browser && npm install'
script:
- make realclean && make examples SWAGGER_CODEGEN="java -jar $HOME/local/swagger-codegen-cli.jar"
- if ! go version | grep devel; then test -z "$(git status --porcelain)" || (git status; git diff; exit 1); fi
- env GLOG_logtostderr=1 go test -race -v github.com/gengo/grpc-gateway/...
- make lint
- sh -c 'cd examples/browser && gulp'
env:
  global:
  - "PATH=$PATH:$HOME/local/bin"

Configure Travis CI with browser integration test
Configure Travis CI with browser integration test
