forked from grpc-ecosystem/grpc-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
35 lines (35 loc) · 1.22 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
language: go
sudo: false
go:
- 1.7.3
- tip
go_import_path: github.com/grpc-ecosystem/grpc-gateway
cache:
directories:
- $HOME/local
- ${TRAVIS_BUILD_DIR}/examples/browser/node_modules
before_install:
- ./.travis/install-protoc.sh 3.1.0
- ./.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/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
- go get github.com/grpc-ecosystem/grpc-gateway/runtime
- go get github.com/grpc-ecosystem/grpc-gateway/examples
- go get github.com/grpc-ecosystem/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 -qv devel) && [ -z "${GATEWAY_PLUGIN_FLAGS}" ]; then test -z "$(git status --porcelain)" || (git status; git diff; exit 1); fi
- env GLOG_logtostderr=1 go test -race -v github.com/grpc-ecosystem/grpc-gateway/...
- make lint
- sh -c 'cd examples/browser && gulp'
env:
global:
- "PATH=$PATH:$HOME/local/bin"
matrix:
- GATEWAY_PLUGIN_FLAGS=
- GATEWAY_PLUGIN_FLAGS=request_context=true