2016-09-19 16:16:06 +03:00
|
|
|
pipeline:
|
|
|
|
test:
|
2017-02-25 04:42:37 +03:00
|
|
|
image: nextcloudci/android:android-15
|
2016-09-19 16:16:06 +03:00
|
|
|
commands:
|
|
|
|
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M
|
2016-09-26 17:24:01 +03:00
|
|
|
- emulator -avd test -no-window &
|
2016-09-19 16:16:06 +03:00
|
|
|
- ./wait_for_emulator.sh
|
|
|
|
# build app and assemble APK, in debug mode
|
|
|
|
- ./gradlew assembleDebug
|
|
|
|
# run all the local unit tests of app module
|
2017-02-25 05:00:36 +03:00
|
|
|
- ./gradlew :testGenericDebugUnitTest
|
2017-03-16 20:33:32 +03:00
|
|
|
- ./gradlew :testModifiedDebugUnitTest
|
2016-09-19 16:16:06 +03:00
|
|
|
# run all the instrumented tests of app module - DISABLED until we get an stable setup for Espresso in Travis
|
|
|
|
# - ./gradlew connectedDebugAndroidTest --info
|
|
|
|
# install app, then assemble and install instrumented tests of app module
|
2017-02-25 05:07:46 +03:00
|
|
|
- ./gradlew :installGenericDebug
|
2017-03-16 20:33:32 +03:00
|
|
|
- ./gradlew :installModifiedDebug
|
2017-02-25 05:07:46 +03:00
|
|
|
- ./gradlew :installGenericDebugAndroidTest
|
2017-03-16 20:33:32 +03:00
|
|
|
- ./gradlew :installModifiedDebugAndroidTest
|
2016-09-19 16:16:06 +03:00
|
|
|
# run sample instrumented unit test
|
2016-09-19 17:40:28 +03:00
|
|
|
# TODO fails because test runner is not available
|
|
|
|
#- adb shell am instrument -w -e debug false -e class com.owncloud.android.datamodel.OCFileUnitTest com.owncloud.android.test/android.support.test.runner.AndroidJUnitRunner
|
2016-09-19 16:16:06 +03:00
|
|
|
|
|
|
|
environment:
|
2017-02-25 04:43:06 +03:00
|
|
|
- ANDROID_TARGET=android-24
|
2016-09-26 14:53:52 +03:00
|
|
|
- ANDROID_ABI=armeabi-v7a
|
2016-09-19 16:16:06 +03:00
|
|
|
- LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/android-sdk-linux/tools/lib64/gles_mesa/
|