android/.drone.yml

43 lines
1.6 KiB
YAML
Raw Normal View History

2016-09-19 13:16:06 +00:00
pipeline:
2017-05-11 11:59:54 +00:00
lint:
image: nextcloudci/android:android-18
commands:
- export BRANCH=$(scripts/lint/getBranchName.sh ${GIT_USERNAME} ${GIT_TOKEN} ${DRONE_PULL_REQUEST})
- ruby scripts/lint/lint-up.rb ${GIT_USERNAME} ${GIT_TOKEN} $BRANCH
2016-09-19 13:16:06 +00:00
test:
2017-05-11 11:59:54 +00:00
image: nextcloudci/android:android-18
2016-09-19 13:16:06 +00:00
commands:
# uncomment gplay for Gplay, Modified only
- sh -c "if [ '$FLAVOUR' != 'Generic' ]; then sed -i '/com.google.*.gms/s/^.*\/\///g' build.gradle; fi"
2016-09-19 13:16:06 +00:00
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M
2016-09-26 14:24:01 +00:00
- emulator -avd test -no-window &
2016-09-19 13:16:06 +00:00
- ./wait_for_emulator.sh
2016-09-19 13:16:06 +00:00
# build app and assemble APK, in debug mode
- ./gradlew assemble${FLAVOUR}
2016-09-19 13:16:06 +00:00
# run all the instrumented tests of app module - DISABLED until we get an stable setup for Espresso in Travis
# - ./gradlew connectedDebugAndroidTest --info
2016-09-19 13:16:06 +00:00
# install app, then assemble and install instrumented tests of app module
- ./gradlew :install${FLAVOUR}Debug
- ./gradlew :install${FLAVOUR}DebugAndroidTest
2016-09-19 13:16:06 +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
2016-09-19 13:16:06 +00:00
environment:
2017-02-25 01:43:06 +00:00
- ANDROID_TARGET=android-24
2016-09-26 11:53:52 +00:00
- ANDROID_ABI=armeabi-v7a
2016-09-19 13:16:06 +00:00
- LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/android-sdk-linux/tools/lib64/gles_mesa/
matrix:
FLAVOUR:
- Generic
- Gplay
- Modified
branches: master