-
Notifications
You must be signed in to change notification settings - Fork 38
/
.travis.yml
50 lines (43 loc) · 1.47 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
language: android
# sudo set to required because of an issue with how TravisCI handles builds in Docker containers https://github.com/travis-ci/travis-ci/issues/3695.
# Setting sudo to required prevents Travis from testing the project in a Docker container.
sudo: required
jdk: oraclejdk8
env:
matrix:
- ANDROID_TARGET=android-21 ANDROID_ABI=armeabi-v7a
global:
# wait up to 10 minutes for adb to connect to emulator
- ADB_INSTALL_TIMEOUT=10
- MALLOC_ARENA_MAX=2
android:
components:
- platform-tools
- tools
- build-tools-23.0.3
- android-21
- android-23
- extra-android-m2repository
# Emulator for the tests
- sys-img-armeabi-v7a-android-21
addons:
apt_packages:
- pandoc
artifacts:
paths:
- $(git ls-files -o | grep build/outputs | tr "\n" ":")
before_script:
- echo no | android create avd --force --name test --target $ANDROID_TARGET --abi $ANDROID_ABI
- mksdcard 32M sdcard.img
- emulator -avd test -no-skin -no-audio -no-window -sdcard sdcard.img &
script:
- android-wait-for-emulator
- adb devices
- (sleep 120; adb shell input keyevent 82 &) &
- ./gradlew connectedAndroidTest -i --stacktrace -x MapboxAndroidSDK:connectedAndroidTest
after_failure:
- pandoc app/build/reports/androidTests/connected/index.html -t plain
after_script:
# print lint results details
- for f in app/build/outputs/lint-results.html; do pandoc $f -t plain; done
- for f in data/build/outputs/lint-results.html; do pandoc $f -t plain; done