-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
45 lines (38 loc) · 1.25 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
language: android
dist: trusty
os: linux
jdk:
- oraclejdk8
env:
global:
- ANDROID_ABI=armeabi-v7a
- EMULATOR_API_LEVEL=android-22
android:
components:
- tools
- platform-tools
- build-tools-30.0.3
- android-30
- $EMULATOR_API_LEVEL
- sys-img-${ANDROID_ABI}-${EMULATOR_API_LEVEL}
before_install:
- yes | sdkmanager "platforms;android-30"
script:
- chmod +x gradlew
# - echo no | android create avd --force -n test -t $EMULATOR_API_LEVEL --abi $ANDROID_ABI --device 'Nexus 6'
# - emulator -avd test -skin 1440x2560 -no-audio -no-window &
# - android-wait-for-emulator
# - adb shell input keyevent 82 &
# The api keys are stored in the local.properties in my local env. So i have to create Fake key
# because I can't store my keys in a public repo, that means only the unit test will be executed
# in the ci env because the ui tests need the keys. I will find a better solution .
- printf "\nGOOGLE_PLACE_API_KEY=SECRET_0 \nGOOGLE_MAP_API_KEY=SECRET_1" > local.properties
- ./gradlew test
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