.drone.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. pipeline:
  2. test:
  3. image: nextcloudci/android:android-23
  4. commands:
  5. # uncomment gplay for Gplay, Modified only
  6. - sh -c "if [ '$FLAVOUR' != 'Generic' ]; then sed -i '/.*com.google.*/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. - sh -c "if [ '$FLAVOUR' != 'Lint' ]; then ./gradlew assemble${FLAVOUR}; fi"
  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-23
  26. commands:
  27. # needs gplay
  28. - sed -i '/.*com.google.*/s/^.*\\/\\///g' build.gradle
  29. - export BRANCH=$(scripts/lint/getBranchName.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST)
  30. - scripts/lint/lint-up-wrapper.sh $GIT_USERNAME $GIT_TOKEN $BRANCH $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER
  31. secrets: [ GIT_USERNAME, GIT_TOKEN, LOG_USERNAME, LOG_PASSWORD ]
  32. when:
  33. matrix:
  34. FLAVOUR: Lint
  35. matrix:
  36. FLAVOUR:
  37. - Generic
  38. - Gplay
  39. - Modified
  40. - Lint
  41. branches: master