Skip to content

Commit

Permalink
ci: skip docfx in main 'Kokoro' presubmit (#423)
Browse files Browse the repository at this point in the history
* ci: skip docfx in main 'Kokoro' presubmit

* fix: specify default sessions in noxfile

* add conditional for cd to project root
  • Loading branch information
busunkim96 committed Dec 8, 2020
1 parent 2f81e80 commit e68281e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .kokoro/build.sh
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions .kokoro/docs/docs-presubmit.cfg
Expand Up @@ -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"
}
12 changes: 12 additions & 0 deletions noxfile.py
Expand Up @@ -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.
Expand Down

0 comments on commit e68281e

Please sign in to comment.