-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
65 lines (53 loc) · 2.07 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
language: android
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
env:
global:
# install timeout in minutes (2 minutes by default)
- ADB_INSTALL_TIMEOUT=8
- ANDROID_API_LEVEL=28
- EMULATOR_API_LEVEL=21
- ANDROID_BUILD_TOOLS_VERSION=28.0.3
- ANDROID_ABI=armeabi-v7a
- ANDROID_TAG=google_apis
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
- tools
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
# The SDK version used to compile your project
- android-$ANDROID_API_LEVEL
- android-$EMULATOR_API_LEVEL
# Specify at least one system image,
# if you need to run emulator(s) during your tests
- sys-img-armeabi-v7a-android-$EMULATOR_API_LEVEL
- sys-img-armeabi-v7a-android-$ANDROID_API_LEVEL
before_install:
- yes | sdkmanager "platforms;android-$ANDROID_API_LEVEL"
- sudo apt-get install jq
- wget -O ~/codacy-coverage-reporter-assembly-latest.jar $(curl https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r .assets[0].browser_download_url)
# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force --name test --target android-$EMULATOR_API_LEVEL --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window -gpu off &
- android-wait-for-emulator
- adb devices
- adb shell input keyevent 82 &
script:
- android list target
- echo $ADB_INSTALL_TIMEOUT
- ./gradlew build jacocoTestReport assembleAndroidTest
- ./gradlew connectedCheck
after_success:
- bash <(curl -s https://codecov.io/bash)
- java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter report -l Java -r ./app/build/reports/jacoco/jacocoTestDebugUnitTestReport/jacocoTestDebugUnitTestReport.xml