Skip to content

Commit

Permalink
chore: resolve issue with prerelease presubmit [autoapprove] (#420)
Browse files Browse the repository at this point in the history
Source-Link: googleapis/synthtool@1b9ad76
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:9db98b055a7f8bd82351238ccaacfd3cda58cdf73012ab58b8da146368330021
  • Loading branch information
gcf-owl-bot[bot] authored Jul 26, 2022
1 parent 4e176b9 commit 6cdb4e7
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions packages/google-cloud-python-speech/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ def prerelease_deps(session):

# Install all dependencies
session.install("-e", ".[all, tests, tracing]")
session.install(*UNIT_TEST_STANDARD_DEPENDENCIES)
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
session.install(*unit_deps_all)
system_deps_all = (
SYSTEM_TEST_STANDARD_DEPENDENCIES
+ SYSTEM_TEST_EXTERNAL_DEPENDENCIES
Expand Down Expand Up @@ -362,12 +363,6 @@ def prerelease_deps(session):

session.install(*constraints_deps)

if os.path.exists("samples/snippets/requirements.txt"):
session.install("-r", "samples/snippets/requirements.txt")

if os.path.exists("samples/snippets/requirements-test.txt"):
session.install("-r", "samples/snippets/requirements-test.txt")

prerel_deps = [
"protobuf",
# dependency of grpc
Expand Down Expand Up @@ -404,11 +399,19 @@ def prerelease_deps(session):
system_test_folder_path = os.path.join("tests", "system")

# Only run system tests if found.
if os.path.exists(system_test_path) or os.path.exists(system_test_folder_path):
session.run("py.test", "tests/system")

snippets_test_path = os.path.join("samples", "snippets")

# Only run samples tests if found.
if os.path.exists(snippets_test_path):
session.run("py.test", "samples/snippets")
if os.path.exists(system_test_path):
session.run(
"py.test",
"--verbose",
f"--junitxml=system_{session.python}_sponge_log.xml",
system_test_path,
*session.posargs,
)
if os.path.exists(system_test_folder_path):
session.run(
"py.test",
"--verbose",
f"--junitxml=system_{session.python}_sponge_log.xml",
system_test_folder_path,
*session.posargs,
)

0 comments on commit 6cdb4e7

Please sign in to comment.