.drone.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. pipeline:
  2. test:
  3. image: nextcloudci/android:android-18
  4. commands:
  5. # uncomment gplay for Gplay, Modified only
  6. - sh -c "if [ '$FLAVOUR' != 'Generic' ]; then sed -i '/com.google.*.gms/s/^.*\/\///g' build.gradle; fi"
  7. - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M
  8. - emulator -avd test -no-window &
  9. - ./wait_for_emulator.sh
  10. # build app and assemble APK, in debug mode
  11. - ./gradlew assemble${FLAVOUR}
  12. # run all the instrumented tests of app module - DISABLED until we get an stable setup for Espresso in Travis
  13. # - ./gradlew connectedDebugAndroidTest --info
  14. # install app, then assemble and install instrumented tests of app module
  15. - ./gradlew :install${FLAVOUR}Debug
  16. - ./gradlew :install${FLAVOUR}DebugAndroidTest
  17. # run sample instrumented unit test
  18. # TODO fails because test runner is not available
  19. #- adb shell am instrument -w -e debug false -e class com.owncloud.android.datamodel.OCFileUnitTest com.owncloud.android.test/android.support.test.runner.AndroidJUnitRunner
  20. environment:
  21. - ANDROID_TARGET=android-24
  22. - ANDROID_ABI=armeabi-v7a
  23. - LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/android-sdk-linux/tools/lib64/gles_mesa/
  24. lint:
  25. image: nextcloudci/android:android-18
  26. commands:
  27. # needs gplay
  28. - sed -i '/com.google.*.gms/s/^.*\/\///g' build.gradle
  29. - export BRANCH=$(scripts/lint/getBranchName.sh ${GIT_USERNAME} ${GIT_TOKEN} ${DRONE_PULL_REQUEST})
  30. - ruby scripts/lint/lint-up.rb ${GIT_USERNAME} ${GIT_TOKEN} $BRANCH
  31. when:
  32. matrix:
  33. FLAVOUR: Modified
  34. matrix:
  35. FLAVOUR:
  36. - Generic
  37. - Gplay
  38. - Modified
  39. branches: master