-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
52 lines (45 loc) · 1.62 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
language: android
jdk: oraclejdk8
cache: false
sudo: false
env:
global:
- ANDROID_API_LEVEL=25
- EMULATOR_API_LEVEL=22
- ANDROID_BUILD_TOOLS_VERSION=25.0.2
- ANDROID_ABI=armeabi-v7a
- SDCARD_NAME=sdcard-${EMULATOR_API_LEVEL}.img
android:
components:
# use the latest revision of Android SDK Tools
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-${ANDROID_BUILD_TOOLS_VERSION}
- android-${ANDROID_API_LEVEL}
- android-${EMULATOR_API_LEVEL}
# Support library
- extra-android-support
# Latest artifacts in local repository
- extra-google-m2repository
- extra-android-m2repository
# System images
- sys-img-${ANDROID_ABI}-android-${EMULATOR_API_LEVEL}
before_script:
# Create local.properties
- printf 'bintray.user=${BINTRAY_USER}\nbintray.apikey=${BINTRAY_API_KEY}' > local.properties
# Create SD card (needed for Cucumber)
- mksdcard -l ${SDCARD_NAME} "200M" ${SDCARD_NAME}
# Create & wait for emulator
- echo no | android create avd -f -n emulator-v${EMULATOR_API_LEVEL} -t android-${EMULATOR_API_LEVEL} --abi ${ANDROID_ABI} --sdcard ${SDCARD_NAME}
- emulator -avd emulator-v${EMULATOR_API_LEVEL} -no-audio -no-window &
- ./android-wait-for-emulator
- adb shell input keyevent 82 &
# Install APKs needed for UI tests
- adb install test-apks/AndroidPdfViewer_1_0_1.apk
- adb install test-apks/FakeFacebook.apk
- adb install test-apks/FakeGmail.apk
script:
- ./gradlew jacocoTestReport --stacktrace -Pinstall_options=-r,-t -PTEST_COVERAGE_ENABLED=true
after_success:
- bash <(curl -s https://codecov.io/bash)