1+ #! /bin/bash
2+ # Copyright 2020 Google Inc.
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+ # http://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 CONDIcd TIONS 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+ # `-e` enables the script to automatically fail when a command fails
17+ set -e
18+
19+ # Kokoro setup
20+ if [ -n " $KOKORO_GFILE_DIR " ]; then
21+ # Move into project directory
22+ cd github/cloud-sql-python-connector
23+ # source secrets
24+ source " ${KOKORO_GFILE_DIR} /TEST_SECRETS.sh"
25+ export GOOGLE_APPLICATION_CREDENTIALS=" ${KOKORO_GFILE_DIR} /testing-service-account.json"
26+ fi
27+
28+ # Add python and pip to PATH
29+ export PATH=/c/python37:/c/python37/scripts:$PATH
30+
31+ # install nox for testing
32+ pip install --user -q nox
33+
34+ # add nox to path
35+ export PATH=" /c/Users/kbuilder/AppData/Roaming/Python/Python37/Scripts:$PATH "
36+
37+ echo -e " ******************** Running tests... ********************\n"
38+ nox -s " $RUN_TESTS_SESSION "
39+ echo -e " ******************** Tests complete. ********************\n"
0 commit comments