2016-09-19 16:16:06 +03:00
|
|
|
pipeline:
|
2017-05-11 21:19:40 +03:00
|
|
|
test:
|
|
|
|
image: nextcloudci/android:android-18
|
|
|
|
commands:
|
|
|
|
# uncomment gplay for Gplay, Modified only
|
2017-07-14 10:35:04 +03:00
|
|
|
- sh -c "if [ '$FLAVOUR' != 'Generic' ]; then sed -i '/com.google.*.gms/s/^.*\\/\\///g' build.gradle; fi"
|
2017-05-11 21:19:40 +03:00
|
|
|
|
2017-06-22 10:51:35 +03:00
|
|
|
# - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M
|
|
|
|
# - emulator -avd test -no-window &
|
|
|
|
# - ./wait_for_emulator.sh
|
2017-05-11 21:19:40 +03:00
|
|
|
|
|
|
|
# build app and assemble APK, in debug mode
|
|
|
|
- ./gradlew assemble${FLAVOUR}
|
|
|
|
|
|
|
|
# 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-06-22 10:51:35 +03:00
|
|
|
# - ./gradlew :install${FLAVOUR}Debug
|
|
|
|
# - ./gradlew :install${FLAVOUR}DebugAndroidTest
|
2017-05-11 21:19:40 +03:00
|
|
|
|
|
|
|
# run sample instrumented unit test
|
|
|
|
# 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
|
|
|
|
|
|
|
|
environment:
|
|
|
|
- ANDROID_TARGET=android-24
|
|
|
|
- ANDROID_ABI=armeabi-v7a
|
|
|
|
- LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/android-sdk-linux/tools/lib64/gles_mesa/
|
2017-05-05 17:08:14 +03:00
|
|
|
|
2017-05-11 15:25:42 +03:00
|
|
|
lint:
|
|
|
|
image: nextcloudci/android:android-18
|
|
|
|
commands:
|
|
|
|
# needs gplay
|
2017-07-14 10:45:44 +03:00
|
|
|
- sed -i '/com.google.*.gms/s/^.*\\/\\///g' build.gradle
|
2017-05-11 15:25:42 +03:00
|
|
|
- export BRANCH=$(scripts/lint/getBranchName.sh ${GIT_USERNAME} ${GIT_TOKEN} ${DRONE_PULL_REQUEST})
|
2017-05-17 15:07:04 +03:00
|
|
|
- scripts/lint/lint-up-wrapper.sh ${GIT_USERNAME} ${GIT_TOKEN} $BRANCH ${LOG_USERNAME} ${LOG_PASSWORD} ${DRONE_BUILD_NUMBER}
|
2017-05-11 15:25:42 +03:00
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
FLAVOUR: Modified
|
|
|
|
|
2017-05-05 17:08:14 +03:00
|
|
|
matrix:
|
|
|
|
FLAVOUR:
|
|
|
|
- Generic
|
|
|
|
- Gplay
|
|
|
|
- Modified
|
|
|
|
|
|
|
|
branches: master
|