mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 06:15:12 +00:00
Add pipeline tests
Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
parent
390fa154b5
commit
d7b3ba17de
171
.drone.yml
171
.drone.yml
@ -1,11 +1,12 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: generic
|
||||
|
||||
steps:
|
||||
- name: generic
|
||||
image: nextcloudci/android:android-44
|
||||
commands:
|
||||
- ./gradlew --console=plain assembleGeneric
|
||||
- name: generic
|
||||
image: nextcloudci/android:android-44
|
||||
commands:
|
||||
- ./gradlew --console=plain assembleGeneric
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
@ -16,66 +17,114 @@ trigger:
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: gplay
|
||||
|
||||
steps:
|
||||
- name: gplay
|
||||
image: nextcloudci/android:android-44
|
||||
commands:
|
||||
- ./gradlew --console=plain assembleGplay
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
---
|
||||
kind: pipeline
|
||||
name: analysis
|
||||
|
||||
steps:
|
||||
- name: analysis
|
||||
image: nextcloudci/android:android-44
|
||||
environment:
|
||||
GIT_USERNAME:
|
||||
from_secret: GIT_USERNAME
|
||||
GIT_TOKEN:
|
||||
from_secret: GIT_TOKEN
|
||||
LOG_USERNAME:
|
||||
from_secret: LOG_USERNAME
|
||||
LOG_PASSWORD:
|
||||
from_secret: LOG_PASSWORD
|
||||
commands:
|
||||
- export BRANCH=$(scripts/analysis/getBranchName.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST)
|
||||
- scripts/analysis/analysis-wrapper.sh $GIT_USERNAME $GIT_TOKEN $BRANCH $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER $DRONE_PULL_REQUEST
|
||||
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
host: $EMAIL_HOST
|
||||
port: 587
|
||||
username: $EMAIL_USERNAME
|
||||
password: $EMAIL_PASSWORD
|
||||
from: nextcloud-drone@kaminsky.me
|
||||
skip_verify: true
|
||||
recipients_only: true
|
||||
recipients: [ $EMAIL_RECIPIENTS ]
|
||||
environment:
|
||||
EMAIL_USERNAME:
|
||||
from_secret: EMAIL_USERNAME
|
||||
EMAIL_PASSWORD:
|
||||
from_secret: EMAIL_PASSWORD
|
||||
EMAIL_RECIPIENTS:
|
||||
from_secret: EMAIL_RECIPIENTS
|
||||
EMAIL_HOST:
|
||||
from_secret: EMAIL_HOST
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
status:
|
||||
- failure
|
||||
branch:
|
||||
- master
|
||||
- name: gplay
|
||||
image: nextcloudci/android:android-44
|
||||
commands:
|
||||
- ./gradlew --console=plain assembleGplay
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: tests
|
||||
|
||||
steps:
|
||||
- name: tests
|
||||
image: nextcloudci/android:android-49
|
||||
privileged: true
|
||||
commands:
|
||||
- emulator-headless -avd android-27 -no-snapshot -gpu swiftshader_indirect -no-window -no-audio -skin 500x833 &
|
||||
- scripts/wait_for_emulator.sh
|
||||
- ./gradlew --console=plain connectedGplayDebugAndroidTest
|
||||
|
||||
|
||||
#services:
|
||||
# - name: server
|
||||
# image: nextcloudci/server:server-17 # also change in updateScreenshots.sh
|
||||
# environment:
|
||||
# EVAL: true
|
||||
# commands:
|
||||
# - BRANCH='stable22' /usr/local/bin/initnc.sh
|
||||
# - echo 127.0.0.1 server >> /etc/hosts
|
||||
# - su www-data -c "OC_PASS=user1 php /var/www/html/occ user:add --password-from-env --display-name='User One' user1"
|
||||
# - su www-data -c "OC_PASS=user2 php /var/www/html/occ user:add --password-from-env --display-name='User Two' user2"
|
||||
# - su www-data -c "OC_PASS=user3 php /var/www/html/occ user:add --password-from-env --display-name='User Three' user3"
|
||||
# - su www-data -c "php /var/www/html/occ user:setting user2 files quota 1G"
|
||||
# - su www-data -c "php /var/www/html/occ group:add users"
|
||||
# - su www-data -c "php /var/www/html/occ group:adduser users user1"
|
||||
# - su www-data -c "php /var/www/html/occ group:adduser users user2"
|
||||
# - su www-data -c "git clone -b stable22 https://github.com/nextcloud/activity.git /var/www/html/apps/activity/"
|
||||
# - su www-data -c "php /var/www/html/occ app:enable activity"
|
||||
# - su www-data -c "git clone -b stable22 https://github.com/nextcloud/text.git /var/www/html/apps/text/"
|
||||
# - su www-data -c "php /var/www/html/occ app:enable text"
|
||||
# - su www-data -c "git clone -b stable22 https://github.com/nextcloud/end_to_end_encryption.git /var/www/html/apps/end_to_end_encryption/"
|
||||
# - su www-data -c "php /var/www/html/occ app:enable end_to_end_encryption"
|
||||
# - /usr/local/bin/run.sh
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: analysis
|
||||
|
||||
steps:
|
||||
- name: analysis
|
||||
image: nextcloudci/android:android-44
|
||||
environment:
|
||||
GIT_USERNAME:
|
||||
from_secret: GIT_USERNAME
|
||||
GIT_TOKEN:
|
||||
from_secret: GIT_TOKEN
|
||||
LOG_USERNAME:
|
||||
from_secret: LOG_USERNAME
|
||||
LOG_PASSWORD:
|
||||
from_secret: LOG_PASSWORD
|
||||
commands:
|
||||
- export BRANCH=$(scripts/analysis/getBranchName.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST)
|
||||
- scripts/analysis/analysis-wrapper.sh $GIT_USERNAME $GIT_TOKEN $BRANCH $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER $DRONE_PULL_REQUEST
|
||||
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
host: $EMAIL_HOST
|
||||
port: 587
|
||||
username: $EMAIL_USERNAME
|
||||
password: $EMAIL_PASSWORD
|
||||
from: nextcloud-drone@kaminsky.me
|
||||
skip_verify: true
|
||||
recipients_only: true
|
||||
recipients: [ $EMAIL_RECIPIENTS ]
|
||||
environment:
|
||||
EMAIL_USERNAME:
|
||||
from_secret: EMAIL_USERNAME
|
||||
EMAIL_PASSWORD:
|
||||
from_secret: EMAIL_PASSWORD
|
||||
EMAIL_RECIPIENTS:
|
||||
from_secret: EMAIL_RECIPIENTS
|
||||
EMAIL_HOST:
|
||||
from_secret: EMAIL_HOST
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
status:
|
||||
- failure
|
||||
branch:
|
||||
- master
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
|
24
scripts/wait_for_emulator.sh
Executable file
24
scripts/wait_for_emulator.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Originally written by Ralf Kistner <ralf@embarkmobile.com>, but placed in the public domain
|
||||
|
||||
bootanim=""
|
||||
failcounter=0
|
||||
checkcounter=0
|
||||
|
||||
until [[ "$bootanim" =~ "stopped" ]]; do
|
||||
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1`
|
||||
echo "($checkcounter) $bootanim"
|
||||
if [[ "$bootanim" =~ "not found" || "$bootanim" =~ "error" ]]; then
|
||||
let "failcounter += 1"
|
||||
if [[ $failcounter -gt 3 ]]; then
|
||||
echo "Failed to start emulator"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
let "checkcounter += 1"
|
||||
sleep 20
|
||||
done
|
||||
echo "($checkcounter) Done"
|
||||
adb -e shell input keyevent 82
|
||||
echo "($checkcounter) Unlocked emulator screen"
|
Loading…
Reference in New Issue
Block a user