2016-09-19 13:16:06 +00:00
|
|
|
pipeline:
|
2017-05-11 18:19:40 +00:00
|
|
|
test:
|
2018-04-22 16:32:35 +00:00
|
|
|
image: nextcloudci/android:android-35
|
2017-05-11 18:19:40 +00:00
|
|
|
commands:
|
|
|
|
# uncomment gplay for Gplay, Modified only
|
2017-08-10 21:00:05 +00:00
|
|
|
- sh -c "if [ '$FLAVOUR' != 'Generic' ]; then sed -i '/.*com.google.*/s/^.*\\/\\///g' build.gradle; fi"
|
2017-05-11 18:19:40 +00:00
|
|
|
|
2017-06-22 07:51:35 +00: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 18:19:40 +00:00
|
|
|
|
|
|
|
# build app and assemble APK, in debug mode
|
2017-08-23 12:32:39 +00:00
|
|
|
- sh -c "if [ '$FLAVOUR' != 'Lint' ]; then ./gradlew assemble${FLAVOUR}; fi"
|
2017-05-11 18:19:40 +00: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-06-22 07:51:35 +00:00
|
|
|
# - ./gradlew :install${FLAVOUR}Debug
|
|
|
|
# - ./gradlew :install${FLAVOUR}DebugAndroidTest
|
2017-05-11 18:19:40 +00: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:
|
2018-02-15 06:32:33 +00:00
|
|
|
- ANDROID_TARGET=android-32
|
2017-05-11 18:19:40 +00:00
|
|
|
- ANDROID_ABI=armeabi-v7a
|
|
|
|
- LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/android-sdk-linux/tools/lib64/gles_mesa/
|
2017-05-05 14:08:14 +00:00
|
|
|
|
2017-05-11 12:25:42 +00:00
|
|
|
lint:
|
2018-02-15 06:32:33 +00:00
|
|
|
image: nextcloudci/android:android-32
|
2017-08-23 12:32:39 +00:00
|
|
|
commands:
|
|
|
|
# needs gplay
|
|
|
|
- sed -i '/.*com.google.*/s/^.*\\/\\///g' build.gradle
|
|
|
|
- export BRANCH=$(scripts/lint/getBranchName.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST)
|
|
|
|
- scripts/lint/lint-up-wrapper.sh $GIT_USERNAME $GIT_TOKEN $BRANCH $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER
|
|
|
|
secrets: [ GIT_USERNAME, GIT_TOKEN, LOG_USERNAME, LOG_PASSWORD ]
|
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
FLAVOUR: Lint
|
2017-11-07 09:01:33 +00:00
|
|
|
|
|
|
|
notify:
|
|
|
|
image: drillster/drone-email
|
|
|
|
host: $EMAIL_HOST
|
|
|
|
port: 587
|
|
|
|
username: $EMAIL_USERNAME
|
|
|
|
password: $EMAIL_PASSWORD
|
|
|
|
from: nextcloud-drone@kaminsky.me
|
|
|
|
recipients_only: true
|
|
|
|
recipients: [ $EMAIL_RECIPIENTS ]
|
|
|
|
secrets: [ EMAIL_USERNAME, EMAIL_PASSWORD, EMAIL_RECIPIENTS, EMAIL_HOST ]
|
|
|
|
when:
|
2017-11-10 10:08:04 +00:00
|
|
|
event: push
|
2017-11-09 06:52:09 +00:00
|
|
|
status: failure
|
|
|
|
branch: master
|
2017-05-11 12:25:42 +00:00
|
|
|
|
2017-05-05 14:08:14 +00:00
|
|
|
matrix:
|
|
|
|
FLAVOUR:
|
|
|
|
- Generic
|
|
|
|
- Gplay
|
2017-08-23 12:32:39 +00:00
|
|
|
- Lint
|
2017-05-05 14:08:14 +00:00
|
|
|
|
2017-08-24 17:39:00 +00:00
|
|
|
branches: master
|