File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,20 @@ if [[ $* == *--only-diff-head* ]]; then
51
51
fi
52
52
fi
53
53
54
+ # Only run Python 2.7 if the PR in question has a `kokoro-lite` label
55
+ if [[ ! -z $KOKORO_GITHUB_PULL_REQUEST_NUMBER ]]; then
56
+ curl -s " https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER " \
57
+ | grep " kokoro:lite" > /dev/null
58
+ if [[ $? -eq 0 ]]; then # && [[ "${RUN_TESTS_SESSION}" != "py-2.7" ]]; then
59
+ # Skip this build
60
+ echo " This build is being skipped!"
61
+ echo " GitHub PRs with the 'kokoro:lite'"
62
+ echo " label are ONLY tested in Python 2.7"
63
+
64
+ exit 1
65
+ fi
66
+ fi
67
+
54
68
# Because Kokoro runs presubmit builds simalteneously, we often see
55
69
# quota related errors. I think we can avoid this by changing the
56
70
# order of tests to execute (e.g. reverse order for py-3.8
You can’t perform that action at this time.
0 commit comments