Skip to content

Commit 3d177a8

Browse files
authored
Use kokoro for testing (#580)
* Use kokoro for testing * Remove coveralls
1 parent 781de4c commit 3d177a8

File tree

5 files changed

+58
-0
lines changed

5 files changed

+58
-0
lines changed

.kokoro/build.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
set -eo pipefail
4+
5+
cd github/google-api-python-client
6+
7+
# Disable buffering, so that the logs stream through.
8+
export PYTHONUNBUFFERED=1
9+
10+
python3 -m pip install --upgrade tox
11+
12+
# Run tests
13+
tox

.kokoro/common.cfg

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Download trampoline resources.
4+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
5+
6+
# Use the trampoline script to run in docker.
7+
build_file: "google-api-python-client/.kokoro/trampoline.sh"
8+
9+
# Configure the docker image for kokoro-trampoline.
10+
env_vars: {
11+
key: "TRAMPOLINE_IMAGE"
12+
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
13+
}
14+
15+
# Tell the trampoline which build file to use.
16+
env_vars: {
17+
key: "TRAMPOLINE_BUILD_FILE"
18+
value: "github/google-api-python-client/.kokoro/build.sh"
19+
}

.kokoro/continuous.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto

.kokoro/presubmit.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto

.kokoro/trampoline.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
# Copyright 2017 Google Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
set -eo pipefail
16+
# Always run the cleanup script, regardless of the success of bouncing into
17+
# the container.
18+
function cleanup() {
19+
chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
20+
${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
21+
echo "cleanup";
22+
}
23+
trap cleanup EXIT
24+
python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py"

0 commit comments

Comments
 (0)