File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,9 @@ public static function setUpBeforeClass(): void
7272 if (!extension_loaded ('grpc ' )) {
7373 self ::markTestSkipped ('Must enable grpc extension. ' );
7474 }
75+ if ('true ' !== getenv ('GOOGLE_SPANNER_RUN_BACKUP_TESTS ' )) {
76+ self ::markTestSkipped ('Skipping backup tests. ' );
77+ }
7578 self ::$ instanceId = self ::requireEnv ('GOOGLE_SPANNER_INSTANCE_ID ' );
7679
7780 $ spanner = new SpannerClient ([
Original file line number Diff line number Diff line change @@ -85,14 +85,21 @@ FILES_CHANGED=$(git diff --name-only HEAD $(git merge-base HEAD master))
8585if [ -z " $PULL_REQUEST_NUMBER " ]; then
8686 RUN_ALL_TESTS=1
8787else
88+ labels=$( curl " https://api.github.com/repos/GoogleCloudPlatform/php-docs-samples/issues/$PULL_REQUEST_NUMBER /labels" )
89+
8890 # Check to see if the repo includes the "kokoro:run-all" label
89- if curl " https://api.github.com/repos/GoogleCloudPlatform/php-docs-samples/issues/$PULL_REQUEST_NUMBER /labels" \
90- | grep -q " kokoro:run-all" ; then
91+ if grep -q " kokoro:run-all" <<< $labels ; then
9192 RUN_ALL_TESTS=1
9293 else
9394 RUN_ALL_TESTS=0
9495 fi
9596
97+ # Check to see if the repo includes the "spanner:run-backup-tests" label
98+ # If we intend to run the backup tests in Spanner, we set the env variable
99+ if grep -q " spanner:run-backup-tests" <<< $labels ; then
100+ export GOOGLE_SPANNER_RUN_BACKUP_TESTS=true
101+ fi
102+
96103fi
97104
98105if [ " ${TEST_DIRECTORIES} " = " " ]; then
You can’t perform that action at this time.
0 commit comments