Show failing test url as comment in github
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
d9e3a83446
commit
93f52c463d
@ -15,13 +15,13 @@ pipeline:
|
|||||||
- emulator -avd android-27 -no-window -no-audio &
|
- emulator -avd android-27 -no-window -no-audio &
|
||||||
- ./wait_for_emulator.sh
|
- ./wait_for_emulator.sh
|
||||||
- ./gradlew assembleGplayDebug
|
- ./gradlew assembleGplayDebug
|
||||||
- ./gradlew jacocoTestGplayDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "Unit"
|
- ./gradlew jacocoTestGplayDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
|
||||||
- ./gradlew installGplayDebugAndroidTest
|
- ./gradlew installGplayDebugAndroidTest
|
||||||
- ./gradlew createGplayDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "IT"
|
- ./gradlew createGplayDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
|
||||||
- ./gradlew combinedTestReport
|
- ./gradlew combinedTestReport
|
||||||
- curl -o codecov.sh https://codecov.io/bash
|
- curl -o codecov.sh https://codecov.io/bash
|
||||||
- bash ./codecov.sh -t fc506ba4-33c3-43e4-a760-aada38c24fd5
|
- bash ./codecov.sh -t fc506ba4-33c3-43e4-a760-aada38c24fd5
|
||||||
secrets: [ LOG_USERNAME, LOG_PASSWORD ]
|
secrets: [ LOG_USERNAME, LOG_PASSWORD, GIT_USERNAME, GIT_TOKEN ]
|
||||||
when:
|
when:
|
||||||
matrix:
|
matrix:
|
||||||
FLAVOR: Gplay
|
FLAVOR: Gplay
|
||||||
|
@ -74,7 +74,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# add comment with results
|
# add comment with results
|
||||||
lintResultNew=$(grep "Lint Report.* [0-9]* warnings" build/reports/lint/lint.html | cut -f2 -d':' |cut -f1 -d'<')
|
lintResultNew=$(grep "Lint Report.* [0-9]* warning" build/reports/lint/lint.html | cut -f2 -d':' |cut -f1 -d'<')
|
||||||
|
|
||||||
lintErrorNew=$(echo $lintResultNew | grep "[0-9]* error" -o | cut -f1 -d" ")
|
lintErrorNew=$(echo $lintResultNew | grep "[0-9]* error" -o | cut -f1 -d" ")
|
||||||
if ( [ -z $lintErrorNew ] ); then
|
if ( [ -z $lintErrorNew ] ); then
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#1: LOG_USERNAME
|
||||||
|
#2: LOG_PASSWORD
|
||||||
|
#3: DRONE_BUILD_NUMBER
|
||||||
|
#4: TYPE (IT or Unit)
|
||||||
|
#5: DRONE_PULL_REQUEST
|
||||||
|
#6: GIT_USERNAME
|
||||||
|
#7: GIT_TOKEN
|
||||||
|
|
||||||
URL=https://nextcloud.kaminsky.me/remote.php/webdav/android-integrationTests
|
URL=https://nextcloud.kaminsky.me/remote.php/webdav/android-integrationTests
|
||||||
ID=$3
|
ID=$3
|
||||||
USER=$1
|
USER=$1
|
||||||
@ -16,4 +24,7 @@ find . -type d -exec curl -u $USER:$PASS -X MKCOL $URL/$ID/$(echo {} | sed s#\./
|
|||||||
find . -type f -exec curl -u $USER:$PASS -X PUT $URL/$ID/$(echo {} | sed s#\./##) --upload-file {} \;
|
find . -type f -exec curl -u $USER:$PASS -X PUT $URL/$ID/$(echo {} | sed s#\./##) --upload-file {} \;
|
||||||
|
|
||||||
echo "Uploaded failing tests to https://www.kaminsky.me/nc-dev/android-integrationTests/$ID"
|
echo "Uploaded failing tests to https://www.kaminsky.me/nc-dev/android-integrationTests/$ID"
|
||||||
|
|
||||||
|
curl -u $6:$7 -X POST https://api.github.com/repos/nextcloud/android/issues/$5/comments -d "{ \"body\" : \"$TYPE test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/$ID \" }"
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user