blob: 681be7736a6478c84cf4a505fa134c166b34a30b [file] [log] [blame]
# https://cloud.google.com/solutions/continuous-delivery-with-travis-ci
language: android
cache:
directories:
- "$HOME/.m2"
env:
- PATH=${HOME}/google-cloud-sdk/bin:$PATH CLOUDSDK_CORE_DISABLE_PROMPTS=1
before_install:
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
- echo $GCLOUD_SERVICE_KEY | base64 --decode --ignore-garbage > ${HOME}/gcloud-service-key.json
- curl https://sdk.cloud.google.com | bash
- gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json
- gcloud components update
- gcloud config set project lottie-snapshots
- 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
- nvm use stable
- npm install
android:
components:
- tools
- platform-tools
- build-tools-26.0.1
- android-26
- extra-android-m2repository
licenses:
- android-sdk-license-.+
- ".+"
jdk:
- oraclejdk8
branches:
except:
- gh-pages
notifications:
email: false
script:
- ./gradlew check
- ./gradlew :LottieSample:assembleAndroidTest :LottieSample:assembleDebug
- gcloud firebase test android run --type instrumentation --device model=Nexus5X,version=26 --app LottieSample/build/outputs/apk/LottieSample-debug.apk --test LottieSample/build/outputs/apk/LottieSample-debug-androidTest.apk
- ./post_pr_comment.js
sudo: false