forked from stephanenicolas/Quality-Tools-for-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (53 loc) · 2.39 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
#Thanks to https://raw.github.com/embarkmobile/android-maven-example/master/.travis.yml
branches:
except:
- repository
language: java
jdk: oraclejdk7
env:
matrix:
# android-16 is always included
- ANDROID_SDKS=android-8 ANDROID_TARGET=android-8 ANDROID_ABI=armeabi
- ANDROID_SDKS=android-10 ANDROID_TARGET=android-10 ANDROID_ABI=armeabi
- ANDROID_SDKS=android-16,sysimg-16 ANDROID_TARGET=android-16 ANDROID_ABI=armeabi-v7a
- ANDROID_SDKS=android-17,sysimg-17 ANDROID_TARGET=android-17 ANDROID_ABI=armeabi-v7a
before_install:
# check the travis file
- gem install travis-lint
- travis-lint
# Install base Android SDK
- sudo apt-get update -qq
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq -o Dpkg::Options::="--force-confold" --force-yes --yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null ; fi
- wget http://dl.google.com/android/android-sdk_r22.0.1-linux.tgz
- tar xzf android-sdk_r22.0.1-linux.tgz
- export ANDROID_HOME=$PWD/android-sdk-linux
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
# Install required components.
# For a full list, run `android list sdk -a --extended`
# Note that sysimg-16 downloads the ARM, x86 and MIPS images (we should optimize this).
# Other relevant API's:
# addon-google_apis-google-16
- echo "y" | android update sdk --filter platform-tools,build-tools-17.0.0,android-16,extra-android-support,$ANDROID_SDKS --no-ui --force > /dev/null
#install Android SDK 17 local files to local maven repo
- git clone https://github.com/mosabua/maven-android-sdk-deployer.git
- cd maven-android-sdk-deployer/platforms/android-17/
- mvn install
- cd ../../tools
- mvn clean install
- #Add V4 support library (to use FEST Android)
- cd ../extras/compatibility-v4/
- mvn install
- cd ../../../
# Create and start emulator
# Create and start emulator
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
- mksdcard 50M /tmp/sdcard.img
- emulator -avd test -no-skin -no-audio -no-window -prop persist.sys.language=en -prop persist.sys.country=US -sdcard /tmp/sdcard.img &
before_script:
- ./wait_for_emulator
script:
#run all tests
- mvn clean install -P default -DignoreTestFailure=true
after_script:
- adb logcat -t 500
- for i in android-sample-ui-tests/target/screenshots/*; do echo $i; asciiview $i; done