Skip to content
Permalink
Browse files

Use kokoro for testing (#580)

* Use kokoro for testing

* Remove coveralls
  • Loading branch information...
busunkim96 committed Oct 25, 2018
1 parent 781de4c commit 3d177a82309ec0a2731821f9e320452bd129a12a
Showing with 58 additions and 0 deletions.
  1. +13 −0 .kokoro/build.sh
  2. +19 −0 .kokoro/common.cfg
  3. +1 −0 .kokoro/continuous.cfg
  4. +1 −0 .kokoro/presubmit.cfg
  5. +24 −0 .kokoro/trampoline.sh
@@ -0,0 +1,13 @@
#!/bin/bash

set -eo pipefail

cd github/google-api-python-client

# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1

python3 -m pip install --upgrade tox

# Run tests
tox
@@ -0,0 +1,19 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-api-python-client/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
}

# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-api-python-client/.kokoro/build.sh"
}
@@ -0,0 +1 @@
# Format: //devtools/kokoro/config/proto/build.proto
@@ -0,0 +1 @@
# Format: //devtools/kokoro/config/proto/build.proto
@@ -0,0 +1,24 @@
#!/bin/bash
# Copyright 2017 Google Inc.
#
# 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
#
# http://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 -eo pipefail
# Always run the cleanup script, regardless of the success of bouncing into
# the container.
function cleanup() {
chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
echo "cleanup";
}
trap cleanup EXIT
python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py"

0 comments on commit 3d177a8

Please sign in to comment.
You can’t perform that action at this time.