-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
54 lines (47 loc) · 2.15 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
language: android
dist: trusty
jdk: oraclejdk8
env:
global:
- ADB_INSTALL_TIMEOUT=5
- INSTRUMENTED_TESTS_PAUSE=5000
matrix:
- API=22 ABI=x86_64
# - API=23 ABI=x86_64 # fails due to 'Native crash' in showFlowDetails
# - API=24 ABI=x86_64 # all espresso tests fail due to "Waited for the root of the view hierarchy..."
# - API=25 ABI=x86_64 # as above
# - API=27 ABI=x86_64 # as above
android:
licenses:
- android-sdk-license-.+
- '.+'
components:
- tools # sdkmanager used below to get the rest
install:
- echo 'count=0' > /home/travis/.android/repositories.cfg # avoid harmless sdkmanager warning
- echo y | sdkmanager "platform-tools" >/dev/null
- echo y | sdkmanager "build-tools;29.0.0" >/dev/null # implicit gradle dependency
- echo y | sdkmanager "platforms;android-$API" >/dev/null # API of the emulator we will run
- echo y | sdkmanager "platforms;android-29" >/dev/null # API of the current compileSdkVersion
- echo y | sdkmanager "emulator"
- echo y | sdkmanager "extras;android;m2repository" >/dev/null
- echo y | sdkmanager "extras;google;m2repository" >/dev/null
- echo y | sdkmanager "system-images;android-$API;default;$ABI" # install the emulator
before_script:
- avdmanager list device
- echo no | avdmanager create avd --force --name test --sdcard 100M --package "system-images;android-$API;default;$ABI" --device "Nexus 5X"
- $ANDROID_HOME/emulator/emulator -version
- $ANDROID_HOME/emulator/emulator -verbose -avd test -no-accel -no-snapshot -no-window -selinux permissive -qemu -m 2048 &
- android-wait-for-emulator
- adb shell setprop dalvik.vm.dexopt-flags v=n,o=v
- adb shell settings put global window_animation_scale 0 &
- adb shell settings put global transition_animation_scale 0 &
- adb shell settings put global animator_duration_scale 0 &
- adb logcat -v time > logcat.log &
script:
- ./gradlew -Pandroid.testInstrumentationRunnerArguments.pause=$INSTRUMENTED_TESTS_PAUSE connectedRapidproDebugAndroidTest jacocoMergedReport
after_success:
- bash <(curl -s https://codecov.io/bash)
after_failure:
- adb shell dumpsys package io.rapidpro.surveyor
- cat logcat.log