language: go sudo: false go: - 1.8.x - 1.7.x - 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 -q 1.8) && [ -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