This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
forked from grpc-ecosystem/grpc-gateway
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy path.travis.yml
41 lines (41 loc) · 1.58 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
36
37
38
39
40
41
language: go
sudo: false
go:
- 1.8.x
- 1.9.x
- master
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.2.2
- nvm install v6.1 && nvm use v6.1 && node --version
- go get github.com/golang/lint/golint
- go get github.com/dghubble/sling
- go get github.com/go-resty/resty
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 -q "${GO_VERSION_TO_DIFF_TEST}") && [ -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/...
- if (go version | grep -q "${GO_VERSION_TO_DIFF_TEST}") && [ -z "${GATEWAY_PLUGIN_FLAGS}" ]; then env GLOG_logtostderr=1 ./bin/coverage; fi
- make lint
- sh -c 'cd examples/browser && node ./node_modules/gulp/bin/gulp'
after_success:
- bash <(curl -s https://codecov.io/bash)
env:
global:
- "PATH=$PATH:$HOME/local/bin"
- GO_VERSION_TO_DIFF_TEST="go version go1\.9\.[0-9]\+ linux/amd64"
matrix:
- GATEWAY_PLUGIN_FLAGS=
- GATEWAY_PLUGIN_FLAGS=request_context=false