-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
68 lines (55 loc) · 1.65 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
language: android
sudo: required
env:
matrix:
# - ANDROID_TARGET=android-19 ANDROID_ABI=default/armeabi-v7a
- ANDROID_TARGET=android-21 ANDROID_ABI=default/armeabi-v7a
global:
- ADB_INSTALL_TIMEOUT=10 # 10 minutes (2 minutes by default)
jdk: oraclejdk8
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
android:
update_sdk: true
components:
- platform-tools
- tools
- build-tools-25.0.3
- android-19
- android-21
- android-25
# Additional components
- extra-android-support
- extra-google-m2repository
- extra-android-m2repository
#system images
# - sys-img-armeabi-v7a-android-19
- sys-img-armeabi-v7a-android-21
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
before_script:
- chmod +x gradlew
- android list targets
- echo no | android create avd --force --name test --target $ANDROID_TARGET --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window & #Start emulator
script:
- echo "Travis branch is $TRAVIS_BRANCH"
- echo "Travis branch is in pull request $TRAVIS_PULL+REQUEST"
- echo "Running unit tests"
- ./gradlew build jacocoTestReport assembleAndroidTest
- android-wait-for-emulator
- adb devices
- adb shell input keyevent 82 &
- adb shell setprop dalvik.vm.dexopt-flags v=n,o=v
- echo "Running instrumentation tests"
- ./gradlew connectedCheck
after_success:
- bash <(curl -s https://codecov.io/bash)