Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on stable28 #1383

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ steps:
- ./scripts/wait_for_server.sh server-stable
- scripts/deleteOutdatedComments.sh "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- scripts/deleteOutdatedComments.sh "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- adb logcat -c
- adb logcat > logcat.txt &
- ./gradlew jacocoTestDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew installDebugAndroidTest
- ./gradlew createDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
Expand Down Expand Up @@ -180,7 +182,7 @@ services:
- name: server-stable
image: ghcr.io/nextcloud/continuous-integration-shallow-server:latest
environment:
SERVER_VERSION: stable27
SERVER_VERSION: stable28
commands:
- apt-get update && apt-get install -y composer
- mkdir /var/www/.nvm /var/www/.npm; touch /var/www/.bashrc; chown -R 33:33 /var/www/.nvm /var/www/.npm /var/www/.bashrc
Expand Down Expand Up @@ -232,6 +234,6 @@ trigger:
- pull_request
---
kind: signature
hmac: 05ce597eecb009f9783123cd1e1e507ceed79671fcb5544cd8d4eaafb6df49c1
hmac: 1db4c5952e15c8f0a55ab96243f42c80968f566926d40c2a94747489aef11331

...
10 changes: 5 additions & 5 deletions scripts/uploadReport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ GIT_USERNAME=$7
GIT_TOKEN=$8
REMOTE_FOLDER=$ID-$TYPE-$BRANCH-$(date +%H-%M)
BRANCH_TYPE=$BRANCH-$TYPE
URL=https://nextcloud.kaminsky.me/remote.php/dav/files/$USER/library-integrationTests
URL=https://nextcloud.kaminsky.me/remote.php/dav/files/$USER/android-library-integrationTests

# upload logcat
log_filename=$ID"_logcat.txt.xz"
log_file="${log_filename}"
upload_path="https://nextcloud.kaminsky.me/remote.php/webdav/library-logcat/$log_filename"
upload_path="https://nextcloud.kaminsky.me/remote.php/webdav/android-library-logcat/$log_filename"
xz logcat.txt
mv logcat.txt.xz "$log_file"
curl -u "$USER:$PASS" -X PUT "$upload_path" --upload-file "$log_file"
echo >&2 "Uploaded logcat to https://www.kaminsky.me/nc-dev/library-logcat/$log_filename"
echo >&2 "Uploaded logcat to https://www.kaminsky.me/nc-dev/android-library-logcat/$log_filename"

if [ $TYPE = "IT" ]; then
cd library/build/reports/androidTests/connected
Expand All @@ -39,7 +39,7 @@ fi
find . -type d -exec curl -u $USER:$PASS -X MKCOL $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) \;
find . -type f -exec curl -u $USER:$PASS -X PUT $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) --upload-file {} \;

echo "Uploaded failing library tests to https://www.kaminsky.me/nc-dev/library-integrationTests/$REMOTE_FOLDER"
echo "Uploaded failing library tests to https://www.kaminsky.me/nc-dev/android-library-integrationTests/$REMOTE_FOLDER"

curl -u $GIT_USERNAME:$GIT_TOKEN -X POST https://api.github.com/repos/nextcloud/android-library/issues/$PR_ID/comments -d "{ \"body\" : \"$BRANCH_TYPE test failed: https://www.kaminsky.me/nc-dev/library-integrationTests/$REMOTE_FOLDER/debug/ \" }"
curl -u $GIT_USERNAME:$GIT_TOKEN -X POST https://api.github.com/repos/nextcloud/android-library/issues/$PR_ID/comments -d "{ \"body\" : \"$BRANCH_TYPE test failed: https://www.kaminsky.me/nc-dev/android-library-integrationTests/$REMOTE_FOLDER/debug/ \" }"
exit 1
Loading