Gabriel Peal | 06fdee2 | 2018-02-17 18:08:04 -0800 | [diff] [blame] | 1 | #! /bin/bash |
Gabriel Peal | 6815d7d | 2018-03-15 18:35:53 -0700 | [diff] [blame^] | 2 | if [ -z $TRAVIS_PULL_REQUEST_SLUG ] && [ "$TRAVIS_REPO_SLUG" != "airbnb/lottie-android" ]; then |
Gabriel Peal | 06fdee2 | 2018-02-17 18:08:04 -0800 | [diff] [blame] | 3 | echo "Skipping gcloud run for PR because api keys are not available from forks." |
| 4 | exit 0 |
| 5 | fi |
| 6 | |
Gabriel Peal | 0babb2c | 2018-03-10 15:03:04 -0800 | [diff] [blame] | 7 | |
| 8 | echo $GCLOUD_SERVICE_KEY | base64 --decode --ignore-garbage > ${HOME}/gcloud-service-key.json |
| 9 | curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-182.0.0-linux-x86_64.tar.gz -o gcloud.tar.gz |
| 10 | tar xzf gcloud.tar.gz -C ${HOME} |
| 11 | ${HOME}/google-cloud-sdk/install.sh --quiet --usage-reporting false |
| 12 | gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json |
| 13 | # - gcloud components update |
| 14 | gcloud config set project lottie-snapshots |
| 15 | |
Gabriel Peal | 947b954 | 2018-03-15 18:35:35 -0700 | [diff] [blame] | 16 | gcloud firebase test android run --no-auto-google-login --type instrumentation --device model=Nexus5X,version=26 --app LottieSample/build/outputs/apk/debug/LottieSample-debug.apk --test LottieSample/build/outputs/apk/androidTest/debug/LottieSample-debug-androidTest.apk |
Gabriel Peal | 06fdee2 | 2018-02-17 18:08:04 -0800 | [diff] [blame] | 17 | ./post_pr_comment.js |