|
| 1 | +#!/bin/bash |
| 2 | +# Copyright 2023 Google LLC |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | + |
| 16 | +set -eo pipefail |
| 17 | + |
| 18 | +if [[ -z "${PROJECT_ROOT:-}" ]]; then |
| 19 | + PROJECT_ROOT="${KOKORO_ARTIFACTS_DIR}/git/bigframes" |
| 20 | +fi |
| 21 | + |
| 22 | +cd "${PROJECT_ROOT}" |
| 23 | + |
| 24 | +# Disable buffering, so that the logs stream through. |
| 25 | +export PYTHONUNBUFFERED=1 |
| 26 | + |
| 27 | +# Debug: show build environment |
| 28 | +env | grep KOKORO |
| 29 | + |
| 30 | +# Install pip |
| 31 | +python3 -m pip install --upgrade --quiet pip |
| 32 | +python3 -m pip --version |
| 33 | + |
| 34 | +# Remove old nox |
| 35 | +python3 -m pip uninstall --yes --quiet nox-automation |
| 36 | + |
| 37 | +# Install nox |
| 38 | +python3 -m pip install --upgrade --quiet nox |
| 39 | +python3 -m nox --version |
| 40 | + |
| 41 | +# If NOX_SESSION is set, it only runs the specified session, |
| 42 | +# otherwise run all the sessions. |
| 43 | +if [[ -n "${NOX_SESSION:-}" ]]; then |
| 44 | + python3 -m nox --stop-on-first-error -s ${NOX_SESSION:-} |
| 45 | +else |
| 46 | + python3 -m nox --stop-on-first-error |
| 47 | +fi |
0 commit comments