Update travis config
diff --git a/.travis.yml b/.travis.yml
index 9331184..70d2769 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,6 +10,11 @@
- PATH=${HOME}/gcloud-sdk/bin:$PATH CLOUDSDK_CORE_DISABLE_PROMPTS=1
before_install:
- yes | sdkmanager "platforms;android-27"
+ - export TRAVIS_GIT_BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
+ - export GIT_SHA=$(git rev-parse HEAD)
+ - export GIT_MERGE_BASE=$(git merge-base master)
+ - echo GIT_SHA $GIT_SHA
+ - echo GIT_MERGE_BASE $GIT_MERGE_BASE
install:
- . $HOME/.nvm/nvm.sh
- nvm install stable
@@ -34,6 +39,7 @@
email: false
script:
- ./gradlew check
+
- ./gradlew :LottieSample:assembleAndroidTest :LottieSample:assembleDebug
- ./gcloud_run.sh
sudo: false
diff --git a/gcloud_run.sh b/gcloud_run.sh
index 0b86b3a..87a5488 100755
--- a/gcloud_run.sh
+++ b/gcloud_run.sh
@@ -4,5 +4,14 @@
exit 0
fi
+
+echo $GCLOUD_SERVICE_KEY | base64 --decode --ignore-garbage > ${HOME}/gcloud-service-key.json
+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
+tar xzf gcloud.tar.gz -C ${HOME}
+${HOME}/google-cloud-sdk/install.sh --quiet --usage-reporting false
+gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json
+ # - gcloud components update
+gcloud config set project lottie-snapshots
+
gcloud firebase test android run --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
./post_pr_comment.js
\ No newline at end of file