forked from GoogleCloudPlatform/python-docs-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (36 loc) · 1.73 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
sudo: false
#add language, etc. here
language: python
cache:
directories:
- $HOME/gcloud/
env:
- PATH=$PATH:$HOME/gcloud/google-cloud-sdk/bin GOOGLE_APPLICATION_CREDENTIALS=$TRAVIS_BUILD_DIR/python-docs-samples.json PYTHONPATH=${HOME}/gcloud/google-cloud-sdk/platform/google_appengine TEST_BUCKET_NAME=bigquery-devrel-samples-bucket TEST_PROJECT_ID=bigquery-devrel-samples #Other environment variables on same line
before_install:
#ENCRYPT YOUR PRIVATE KEY (If you need authentication)
# 1. Install and login to the Travis CLI:
# $ gem install travis
# $ travis login
# 2. Move your json private key to client_secrets.json
# 3. Run:
# $ travis encrypt-file client_secrets.json --add
# 4. Commit changes:
# $ git add client_secrets.json.enc
# $ git commit client_secrets.json.enc .travis.yml
- if [ ! -d $HOME/gcloud/google-cloud-sdk ]; then
mkdir -p $HOME/gcloud &&
wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz --directory-prefix=$HOME/gcloud &&
cd $HOME/gcloud &&
tar xzf google-cloud-sdk.tar.gz &&
printf '\ny\n\ny\ny\n' | ./google-cloud-sdk/install.sh &&
cd $TRAVIS_BUILD_DIR;
fi
- gcloud -q components update gae-python
- openssl aes-256-cbc -K $encrypted_4fda24e244ca_key -iv $encrypted_4fda24e244ca_iv -in python-docs-samples.json.enc -out python-docs-samples.json -d
- if [ -a python-docs-samples.json ]; then
gcloud auth activate-service-account --key-file python-docs-samples.json;
fi
install:
- pip install tox
script:
- tox