forked from unfoldingWord-dev/ts-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
111 lines (110 loc) · 3.63 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
language: android
jdk: oraclejdk8
cache:
directories:
- "$HOME/.gradle/caches"
- "$HOME/.gradle/daemon"
- "$HOME/.gradle/native"
- "$HOME/.gradle/wrapper"
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
sudo: false
branches:
except:
- master
env:
global:
- GRADLE_OPTS="-Xms128m"
matrix:
- ANDROID_TARGET=android-25 ANDROID_ABI=armeabi-v7a
android:
components:
- tools
- platform-tools
- tools
- build-tools-25.0.1
- android-25
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- extra-android-support
- addon-google_apis-google-19
- sys-img-armeabi-v7a-android-19
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
before_install:
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then openssl aes-256-cbc -K $encrypted_f97207d0a082_key
-iv $encrypted_f97207d0a082_iv -in translationstudio.keystore.enc -out translationstudio.keystore
-d; fi
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then openssl aes-256-cbc -K $encrypted_1623d09f87af_key
-iv $encrypted_1623d09f87af_iv -in strings_private_app_pref.xml.enc -out app/src/main/res/values/strings_private_app_pref.xml
-d; fi
before_script:
- chmod +x gradlew
#- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
#- emulator -avd test -no-skin -no-audio -no-window &
#- android-wait-for-emulator
#- adb devices
#- adb shell input keyevent 82 &
script:
- ./gradlew test --stacktrace
# - travis_wait ./gradlew connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.size=medium --continue --stacktrace
after_success:
- test $TRAVIS_TEST_RESULT == 0 && $TRAVIS_PULL_REQUEST == "false"
- ./gradlew assembleRelease
- ./gradlew -q generateReleaseHtml
deploy:
# develop branch
- provider: surge
project: "./app/release/"
domain: develop.ts-android.surge.sh
skip_cleanup: true
on:
branch: develop
# catch-all brach
- provider: surge
project: "./app/release/"
domain: sandbox.ts-android.surge.sh
skip_cleanup: true
on:
all_branches: true
tags: false
condition: "$TRAVIS_BRANCH != develop && ! ($TRAVIS_BRANCH =~ ^release-.*$) && $TRAVIS_BRANCH != master"
# release branch
- provider: surge
project: "./app/release/"
domain: release.ts-android.surge.sh
skip_cleanup: true
on:
all_branches: true
tags: false
condition: "$TRAVIS_BRANCH =~ ^release-.*$"
# tagged releases go to github
- provider: releases
api_key:
secure: brjmL3cyCTr6swNCqka2fkc41j+PO2tqXZhE9QyNoDEXcxR1FOwPoPut/8h4N/pISfkf2FibtsWqThhW1Xz1pVNNMBlHRblJsSecfvXOtn7kneCsAV+QBngbPuA8OKzfhXTUeIQNlIpfG+rwlDg28wOthDI/7ADBOYgGQWeOd7o=
file:
- ./app/release/release.apk
file_glob: true
skip_cleanup: true
overwrite: true
on:
tags: true
repo: unfoldingWord-dev/ts-android
# everything goes to test fairy
- provider: testfairy
on:
all_branches: true
skip_cleanup: true
api-key:
secure: Ly2BzebfVJmzCQa954vjiSlobVRWrk4A3q/99GzkjnfxdyCW8NecPzd7UHV+JpbRpD8Fs5P1WJ7CMKjEEGNX5Y/lQYdHhVCqkkPz1zy3FOHWgKH3DNB6JppQRHaYW0v+U0smr+Tzs/ht1uOuZ6OauJs5GohR3q/FjMPygK0wMfQ=
app-file: ./app/release/release.apk
file_glob: true
keystore-file: translationstudio.keystore
alias: translationstudio
storepass:
secure: DQPVq3oXh0odcvgcUPPgrGQYAP9Ke+9x3vhSxGwSglLV6MWJ7PBT49iNlqglJqBj6YguMtydbHKm77y0G3ZJgQ08olkNza3Uq/iOOZjmlirNjXRlOiIxS9DSpc1dqCF+djbmEb6SB41P2WQnTHpLB5q4q6pw5Bw3egDWdu/QxQA=
aliaspass:
secure: DQPVq3oXh0odcvgcUPPgrGQYAP9Ke+9x3vhSxGwSglLV6MWJ7PBT49iNlqglJqBj6YguMtydbHKm77y0G3ZJgQ08olkNza3Uq/iOOZjmlirNjXRlOiIxS9DSpc1dqCF+djbmEb6SB41P2WQnTHpLB5q4q6pw5Bw3egDWdu/QxQA=