diff --git a/packages/google-cloud-bigquery-reservation/.kokoro/build.sh b/packages/google-cloud-bigquery-reservation/.kokoro/build.sh index 5bb320fc0133..0b6feaa7c212 100755 --- a/packages/google-cloud-bigquery-reservation/.kokoro/build.sh +++ b/packages/google-cloud-bigquery-reservation/.kokoro/build.sh @@ -15,7 +15,11 @@ set -eo pipefail -cd github/python-bigquery-reservation +if [[ -z "${PROJECT_ROOT:-}" ]]; then + PROJECT_ROOT="github/python-bigquery-reservation" +fi + +cd "${PROJECT_ROOT}" # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 @@ -30,16 +34,16 @@ export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json") # Remove old nox -python3.6 -m pip uninstall --yes --quiet nox-automation +python3 -m pip uninstall --yes --quiet nox-automation # Install nox -python3.6 -m pip install --upgrade --quiet nox -python3.6 -m nox --version +python3 -m pip install --upgrade --quiet nox +python3 -m nox --version # If NOX_SESSION is set, it only runs the specified session, # otherwise run all the sessions. if [[ -n "${NOX_SESSION:-}" ]]; then - python3.6 -m nox -s "${NOX_SESSION:-}" + python3 -m nox -s ${NOX_SESSION:-} else - python3.6 -m nox + python3 -m nox fi diff --git a/packages/google-cloud-bigquery-reservation/.kokoro/docs/docs-presubmit.cfg b/packages/google-cloud-bigquery-reservation/.kokoro/docs/docs-presubmit.cfg index 1118107829b7..523d14069c2a 100644 --- a/packages/google-cloud-bigquery-reservation/.kokoro/docs/docs-presubmit.cfg +++ b/packages/google-cloud-bigquery-reservation/.kokoro/docs/docs-presubmit.cfg @@ -15,3 +15,14 @@ env_vars: { key: "TRAMPOLINE_IMAGE_UPLOAD" value: "false" } + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: github/python-bigquery-reservation/.kokoro/build.sh" +} + +# Only run this nox session. +env_vars: { + key: "NOX_SESSION" + value: "docs docfx" +} diff --git a/packages/google-cloud-bigquery-reservation/.trampolinerc b/packages/google-cloud-bigquery-reservation/.trampolinerc index 995ee29111e1..c7d663ae9c57 100644 --- a/packages/google-cloud-bigquery-reservation/.trampolinerc +++ b/packages/google-cloud-bigquery-reservation/.trampolinerc @@ -18,12 +18,14 @@ required_envvars+=( "STAGING_BUCKET" "V2_STAGING_BUCKET" + "NOX_SESSION" ) # Add env vars which are passed down into the container here. pass_down_envvars+=( "STAGING_BUCKET" "V2_STAGING_BUCKET" + "NOX_SESSION" ) # Prevent unintentional override on the default image. diff --git a/packages/google-cloud-bigquery-reservation/noxfile.py b/packages/google-cloud-bigquery-reservation/noxfile.py index 8004482ed0a9..e938b7f369d5 100644 --- a/packages/google-cloud-bigquery-reservation/noxfile.py +++ b/packages/google-cloud-bigquery-reservation/noxfile.py @@ -30,6 +30,17 @@ SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"] UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] +# 'docfx' is excluded since it only needs to run in 'docs-presubmit' +nox.options.sessions = [ + "unit", + "system", + "cover", + "lint", + "lint_setup_py", + "blacken", + "docs", +] + @nox.session(python=DEFAULT_PYTHON_VERSION) def lint(session): diff --git a/packages/google-cloud-bigquery-reservation/synth.metadata b/packages/google-cloud-bigquery-reservation/synth.metadata index 546a22559416..cefb05778314 100644 --- a/packages/google-cloud-bigquery-reservation/synth.metadata +++ b/packages/google-cloud-bigquery-reservation/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-bigquery-reservation.git", - "sha": "4215e2652157713ae8cbcbed74dbeaecb1f493d8" + "sha": "555c4eeb6daa09b713632e92fbc8dc2a7aa37495" } }, { @@ -19,14 +19,14 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "41a4e56982620d3edcf110d76f4fcdfdec471ac8" + "sha": "fb53b6fb373b7c3edf4e55f3e8036bc6d73fa483" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "41a4e56982620d3edcf110d76f4fcdfdec471ac8" + "sha": "fb53b6fb373b7c3edf4e55f3e8036bc6d73fa483" } } ],