travis: start two build jobs

- unit tests
- androidTests
This commit is contained in:
Andrea Torlaschi
2016-07-09 16:49:01 +02:00
parent 0f2a22cd29
commit 4322a38097

View File

@@ -1,11 +1,8 @@
language: android
jdk: openjdk7
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
- TEST=unit
- TEST=android ANDROID_TARGET=android-21 ANDROID_ABI=armeabi-v7a ADB_INSTALL_TIMEOUT=10
# force non-container build
sudo: required
@@ -20,6 +17,7 @@ before_install:
- sudo hostname "$(hostname | cut -c1-63)"
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
- cat /etc/hosts # optionally check the content *after*
android:
components:
- android-22
@@ -35,14 +33,16 @@ android:
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
before_script:
- echo no | android create avd --force --name test --target $ANDROID_TARGET --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb devices
- adb shell input keyevent 82 &
- adb shell svc power stayon true
script:
- ./gradlew --stacktrace connectedFdroidDebugAndroidTest -i
- ./gradlew --stacktrace testDebug jacocoTestReport coveralls
- if [ ${TEST} == "unit" ]; then
./gradlew --stacktrace testDebug jacocoTestReport coveralls;
fi
- if [ ${TEST} == "android" ]; then
echo no | android create avd --force --name test --target $ANDROID_TARGET --abi $ANDROID_ABI;
emulator -avd test -no-skin -no-audio -no-window &
android-wait-for-emulator;
adb devices;
adb shell svc power stayon true;
adb shell input keyevent 82;
./gradlew --stacktrace connectedFdroidDebugAndroidTest -i;
fi