diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 0e71e2aca..cb81a05f8 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -15,7 +15,11 @@ set -eo pipefail -cd github/python-bigquery +if [[ -z "${PROJECT_ROOT:-}" ]]; then + PROJECT_ROOT="github/python-bigquery" +fi + +cd "${PROJECT_ROOT}" # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 diff --git a/.kokoro/docs/docs-presubmit.cfg b/.kokoro/docs/docs-presubmit.cfg index 111810782..5c216b4bc 100644 --- a/.kokoro/docs/docs-presubmit.cfg +++ b/.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/.kokoro/build.sh" +} + +# Only run this nox session. +env_vars: { + key: "NOX_SESSION" + value: "docs docfx" +} \ No newline at end of file diff --git a/noxfile.py b/noxfile.py index 441782583..95818d3c8 100644 --- a/noxfile.py +++ b/noxfile.py @@ -25,6 +25,18 @@ BLACK_PATHS = ("docs", "google", "samples", "tests", "noxfile.py", "setup.py") CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# 'docfx' is excluded since it only needs to run in 'docs-presubmit' +nox.options.sessions = [ + "unit", + "system", + "snippets", + "cover", + "lint", + "lint_setup_py", + "blacken", + "docs", +] + def default(session): """Default unit test session.