forked from nextcloud/android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
64 lines (54 loc) · 2.28 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
pipeline:
test:
image: nextcloudci/android:android-32
commands:
# uncomment gplay for Gplay, Modified only
- sh -c "if [ '$FLAVOUR' != 'Generic' ]; then sed -i '/.*com.google.*/s/^.*\\/\\///g' build.gradle; fi"
# - 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
# build app and assemble APK, in debug mode
- sh -c "if [ '$FLAVOUR' != 'Lint' ]; then ./gradlew assemble${FLAVOUR}; fi"
# 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
# - ./gradlew :install${FLAVOUR}Debug
# - ./gradlew :install${FLAVOUR}DebugAndroidTest
# 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-32
- ANDROID_ABI=armeabi-v7a
- LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/android-sdk-linux/tools/lib64/gles_mesa/
lint:
image: nextcloudci/android:android-32
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
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:
event: push
status: failure
branch: master
matrix:
FLAVOUR:
- Generic
- Gplay
- Lint
branches: master