2021-01-06 11:39:46 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-06-11 16:49:34 +03:00
|
|
|
GIT_USERNAME=$1
|
|
|
|
GIT_TOKEN=$2
|
|
|
|
DRONE_PULL_REQUEST=$3
|
|
|
|
LOG_USERNAME=$4
|
|
|
|
LOG_PASSWORD=$5
|
|
|
|
DRONE_BUILD_NUMBER=$6
|
|
|
|
|
2021-07-16 12:05:18 +03:00
|
|
|
scripts/deleteOutdatedComments.sh "master" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
|
|
|
|
scripts/deleteOutdatedComments.sh "master" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
|
|
|
|
|
2021-06-11 16:49:34 +03:00
|
|
|
./gradlew assembleGplay
|
|
|
|
./gradlew assembleGplayDebug
|
|
|
|
|
|
|
|
scripts/wait_for_emulator.sh
|
|
|
|
./gradlew jacocoTestGplayDebugUnitTestReport
|
2021-07-07 10:11:21 +03:00
|
|
|
stat=$?
|
2021-06-11 16:49:34 +03:00
|
|
|
|
2021-07-07 10:11:21 +03:00
|
|
|
if [ ! $stat -eq 0 ]; then
|
2021-06-11 16:49:34 +03:00
|
|
|
bash scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
|
|
|
|
fi
|
|
|
|
|
|
|
|
./gradlew installGplayDebugAndroidTest
|
|
|
|
scripts/wait_for_server.sh "server"
|
|
|
|
./gradlew createGplayDebugCoverageReport -Pcoverage -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.utils.ScreenshotTest
|
2021-07-07 10:11:21 +03:00
|
|
|
stat=$(( stat | $? ))
|
2021-06-11 16:49:34 +03:00
|
|
|
|
2021-07-07 10:11:21 +03:00
|
|
|
if [ ! $stat -eq 0 ]; then
|
2021-06-11 16:49:34 +03:00
|
|
|
bash scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
|
|
|
|
fi
|
|
|
|
|
2021-01-06 11:39:46 +03:00
|
|
|
./gradlew combinedTestReport
|
2021-07-07 10:11:21 +03:00
|
|
|
stat=$(( stat | $? ))
|
2021-01-06 11:39:46 +03:00
|
|
|
|
|
|
|
curl -o codecov.sh https://codecov.io/bash
|
|
|
|
bash ./codecov.sh -t fc506ba4-33c3-43e4-a760-aada38c24fd5
|
|
|
|
|
2021-07-07 10:11:21 +03:00
|
|
|
echo "Exit with: " $stat
|
|
|
|
exit $stat
|