forked from airbnb/lottie-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (75 loc) · 2.04 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
language: android
group: travis_lts
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
- "$HOME/.android/build-cache"
- "$HOME/.m2"
- "$HOME/google-cloud-sdk/"
- "$HOME/.cache"
- "$TRAVIS_BUILD_DIR/build"
- "$TRAVIS_BUILD_DIR/lottie/build"
- "$TRAVIS_BUILD_DIR/LottieSample/build"
env:
- PATH=${HOME}/google-cloud-sdk/bin:$PATH CLOUDSDK_CORE_DISABLE_PROMPTS=1
before_install:
- openssl aes-256-cbc -K $encrypted_7f6a0d70974a_key -iv $encrypted_7f6a0d70974a_iv
-in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
- 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
- tools
- build-tools-27.0.3
- android-27
- extra-android-m2repository
jdk:
- oraclejdk8
branches:
except:
- gh-pages
notifications:
email: false
jobs:
include:
- stage: test
name: Lottie Lint
script: "./gradlew :lottie:lintRelease"
- name: Lottie Unit Tests
script: "./gradlew :lottie:testReleaseUnitTest"
- name: LottieSample Lint
script: "./gradlew :LottieSample:lintRelease"
- name: LottieSample Unit Tests
script: "./gradlew :LottieSample:testReleaseUnitTest"
- name: Firebase Happo Tests
script:
- "./gradlew :LottieSample:assembleDebug :LottieSample:assembleAndroidTest"
- "./gcloud_run.sh"
- stage: deploy
name: Create release and upload artifacts
script:
- "./sign.sh"
deploy:
provider: releases
api_key: "$GITHUB_ACCESS_TOKEN"
file: LottieSample/build/outputs/apk/release/LottieSample-release-aligned.apk
skip_cleanup: true
on:
tags: true
sudo: false