Skip to content

Commit eabfb04

Browse files
authored
Create .travis.yml
1 parent 1e15dd7 commit eabfb04

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.travis.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
language: android
2+
jdk: oraclejdk8
3+
sudo: false
4+
5+
notifications:
6+
email:
7+
8+
9+
env:
10+
matrix:
11+
- ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a
12+
- ANDROID_TARGET=android-21 ANDROID_ABI=armeabi-v7a
13+
global:
14+
- ADB_INSTALL_TIMEOUT=10 #Time out to 10 mins
15+
16+
before_cache:
17+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
18+
19+
cache:
20+
directories: #Cache all dirs under .gradle folder
21+
- $HOME/.gradle/daemon #Cache daemon logs
22+
- $HOME/.gradle/native #Cache library downloaded from the gradle dependency
23+
- $HOME/.gradle/wrapper #Cache the gradle
24+
25+
android:
26+
update_sdk: true
27+
components:
28+
- platform-tools
29+
- tools
30+
- build-tools-25.0.1
31+
- android-25
32+
33+
# Additional components
34+
- extra-google-google_play_services
35+
- extra-google-m2repository
36+
- extra-android-m2repository
37+
38+
#system images
39+
- sys-img-armeabi-v7a-android-19
40+
- sys-img-armeabi-v7a-android-21
41+
42+
licenses:
43+
- 'android-sdk-preview-license-52d11cd2'
44+
- 'android-sdk-license-.+'
45+
- 'google-gdk-license-.+'
46+
47+
before_script:
48+
- chmod +x gradlew #Grand permissions
49+
- android list targets
50+
- echo no | android create avd --force --name test --target $ANDROID_TARGET --abi $ANDROID_ABI #Create AVD for given api
51+
- emulator -avd test -no-skin -no-audio -no-window & #Start emulator
52+
53+
script:
54+
- echo "Travis branch is $TRAVIS_BRANCH"
55+
- echo "Travis branch is in pull request $TRAVIS_PULL+REQUEST"
56+
- android-wait-for-emulator
57+
- adb devices #Display list of devices
58+
- adb shell input keyevent 82 &
59+
- ./gradlew connectedCheck -PdisablePreDex --stacktrace
60+
61+
before_install:
62+
- pip install --user codecov #Install codecov
63+
64+
after_success:
65+
- codecov #Run codecov
66+
67+
after_failure: "cat $TRAVIS_BUILD_DIR/app/build/outputs/lint-results-debug.xml"

0 commit comments

Comments
 (0)