From f93463ec781669a76ad5182bc566d1772bb8e5ca Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 2 Aug 2018 21:17:01 -0700 Subject: [PATCH] Add more tests to be run by kokoro webhook --- docker-compose.yml | 6 ++++++ kokoro/presubmit.cfg | 2 +- scripts/kokoro.sh | 31 +++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 scripts/kokoro.sh diff --git a/docker-compose.yml b/docker-compose.yml index cf2c9dd..9777c9e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,8 @@ services: build: context: ./ dockerfile: ./net/grpc/gateway/docker/echo_server/Dockerfile + depends_on: + - prereqs image: grpc-web:echo-server ports: - "9090:9090" @@ -25,6 +27,8 @@ services: build: context: ./ dockerfile: ./net/grpc/gateway/docker/static_assets/Dockerfile + depends_on: + - prereqs image: grpc-web:static-assets ports: - "80:80" @@ -32,6 +36,8 @@ services: build: context: ./ dockerfile: ./net/grpc/gateway/docker/commonjs_client_example/Dockerfile + depends_on: + - prereqs image: grpc-web:commonjs-client-example ports: - "8081:8081" diff --git a/kokoro/presubmit.cfg b/kokoro/presubmit.cfg index 7754f44..6f1ce0a 100644 --- a/kokoro/presubmit.cfg +++ b/kokoro/presubmit.cfg @@ -1 +1 @@ -build_file: "grpc-web/scripts/ubuntu_16_04.sh" +build_file: "grpc-web/scripts/kokoro.sh" diff --git a/scripts/kokoro.sh b/scripts/kokoro.sh new file mode 100644 index 0000000..ef970cb --- /dev/null +++ b/scripts/kokoro.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +set -ex + +cd "$(dirname "$0")" +./init_submodules.sh +cd .. +make clean + +docker build -t grpc-web:ubuntu_16_04 \ + -f net/grpc/gateway/docker/ubuntu_16_04/Dockerfile . + +docker-compose build + +bazel test javascript/net/grpc/web/... + +cd packages/grpc-web && \ + npm install && \ + npm run build