Skip to content

Commit 99b584b

Browse files
committed
adds conditional if GOOGLE_APPLICATION_CREDENTIALS is not set
1 parent 3da5fb2 commit 99b584b

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

packages/google-cloud-bigquery/noxfile.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -465,19 +465,23 @@ def prerelease_deps(session):
465465
"-W default::PendingDeprecationWarning",
466466
)
467467

468-
session.run(
469-
"py.test",
470-
"-n=auto",
471-
"tests/system",
472-
"-W default::PendingDeprecationWarning",
473-
)
468+
if os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""):
469+
session.run(
470+
"py.test",
471+
"-n=auto",
472+
"tests/system",
473+
"-W default::PendingDeprecationWarning",
474+
)
475+
476+
session.run(
477+
"py.test",
478+
"-n=auto",
479+
"samples/tests",
480+
"-W default::PendingDeprecationWarning",
481+
)
482+
else:
483+
session.log("Skipping system tests because GOOGLE_APPLICATION_CREDENTIALS is not set.")
474484

475-
session.run(
476-
"py.test",
477-
"-n=auto",
478-
"samples/tests",
479-
"-W default::PendingDeprecationWarning",
480-
)
481485

482486

483487
@nox.session(python=DEFAULT_PYTHON_VERSION)

0 commit comments

Comments
 (0)