travis: start two build jobs
- unit tests - androidTests
This commit is contained in:
64
.travis.yml
64
.travis.yml
@@ -1,11 +1,8 @@
|
|||||||
language: android
|
language: android
|
||||||
jdk: openjdk7
|
jdk: openjdk7
|
||||||
env:
|
env:
|
||||||
matrix:
|
- TEST=unit
|
||||||
- ANDROID_TARGET=android-21 ANDROID_ABI=armeabi-v7a
|
- TEST=android ANDROID_TARGET=android-21 ANDROID_ABI=armeabi-v7a ADB_INSTALL_TIMEOUT=10
|
||||||
global:
|
|
||||||
# wait up to 10 minutes for adb to connect to emulator
|
|
||||||
- ADB_INSTALL_TIMEOUT=10
|
|
||||||
|
|
||||||
# force non-container build
|
# force non-container build
|
||||||
sudo: required
|
sudo: required
|
||||||
@@ -16,33 +13,36 @@ sudo: required
|
|||||||
# hostname: short-hostname
|
# hostname: short-hostname
|
||||||
# workaround from https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
|
# workaround from https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
|
||||||
before_install:
|
before_install:
|
||||||
- cat /etc/hosts # optionally check the content *before*
|
- cat /etc/hosts # optionally check the content *before*
|
||||||
- sudo hostname "$(hostname | cut -c1-63)"
|
- sudo hostname "$(hostname | cut -c1-63)"
|
||||||
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
|
- 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*
|
- cat /etc/hosts # optionally check the content *after*
|
||||||
android:
|
|
||||||
components:
|
|
||||||
- android-22
|
|
||||||
- android-23
|
|
||||||
- tools
|
|
||||||
- platform-tools
|
|
||||||
- build-tools-23.0.2
|
|
||||||
- extra-android-support
|
|
||||||
- extra-android-m2repository
|
|
||||||
- sys-img-armeabi-v7a-android-21
|
|
||||||
licenses:
|
|
||||||
- 'android-sdk-preview-license-52d11cd2'
|
|
||||||
- 'android-sdk-license-.+'
|
|
||||||
- 'google-gdk-license-.+'
|
|
||||||
|
|
||||||
before_script:
|
android:
|
||||||
- echo no | android create avd --force --name test --target $ANDROID_TARGET --abi $ANDROID_ABI
|
components:
|
||||||
- emulator -avd test -no-skin -no-audio -no-window &
|
- android-22
|
||||||
- android-wait-for-emulator
|
- android-23
|
||||||
- adb devices
|
- tools
|
||||||
- adb shell input keyevent 82 &
|
- platform-tools
|
||||||
- adb shell svc power stayon true
|
- build-tools-23.0.2
|
||||||
|
- extra-android-support
|
||||||
|
- extra-android-m2repository
|
||||||
|
- sys-img-armeabi-v7a-android-21
|
||||||
|
licenses:
|
||||||
|
- 'android-sdk-preview-license-52d11cd2'
|
||||||
|
- 'android-sdk-license-.+'
|
||||||
|
- 'google-gdk-license-.+'
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./gradlew --stacktrace connectedFdroidDebugAndroidTest -i
|
- if [ ${TEST} == "unit" ]; then
|
||||||
- ./gradlew --stacktrace testDebug jacocoTestReport coveralls
|
./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
|
||||||
|
|||||||
Reference in New Issue
Block a user