-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
59 lines (46 loc) · 1.53 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
language: android
jdk: oraclejdk8
env:
matrix:
- ANDROID_TARGET=android-17 EMULATOR_TAG=google_apis EMULATOR_ABI=armeabi-v7a EMULATOR_API=17
- ANDROID_TARGET=android-23 EMULATOR_TAG=google_apis EMULATOR_ABI=armeabi-v7a EMULATOR_API=23
android:
update_sdk: true
components:
# Tools section appears twice on purpose as it’s required to get the newest Android SDK tools
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-25.0.3
# The SDK version used to compile your project
- $ANDROID_TARGET
# Additional components
- extra-android-m2repository
# Specify system images to run emulators during the tests
- sys-img-$EMULATOR_ABI-$EMULATOR_TAG-$EMULATOR_API
# Avoid uploading the cache after every build
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
before_install:
# Prevent ./gradlew: Permission denied
- chmod +x gradlew
# Install codecov
- pip install --user codecov
# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force --name test --target $ANDROID_TARGET --tag $EMULATOR_TAG --abi $EMULATOR_ABI
- emulator -avd test -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
#Build, and run tests
script:
- ./gradlew jacocoTestReport --continue --stacktrace
#Codecov
after_success:
- codecov