浏览代码

Upload coverage report even if combindedTestReport fails

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 4 年之前
父节点
当前提交
296647ba9d
共有 2 个文件被更改,包括 11 次插入3 次删除
  1. 2 3
      .drone.yml
  2. 9 0
      scripts/runCombinedTest.sh

+ 2 - 3
.drone.yml

@@ -110,9 +110,8 @@ steps:
       - ./gradlew installGplayDebugAndroidTest
       - scripts/wait_for_server.sh "server"
       - ./gradlew createGplayDebugCoverageReport -Pcoverage -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.utils.ScreenshotTest && scripts/deleteOutdatedComments.sh "master" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
-      - ./gradlew combinedTestReport
-      - curl -o codecov.sh https://codecov.io/bash
-      - bash ./codecov.sh -t fc506ba4-33c3-43e4-a760-aada38c24fd5
+      - scripts/runCombinedTest.sh
+
   - name: notify
     image: drillster/drone-email
     settings:

+ 9 - 0
scripts/runCombinedTest.sh

@@ -0,0 +1,9 @@
+#!/bin/bash
+
+./gradlew combinedTestReport
+status=$?
+
+curl -o codecov.sh https://codecov.io/bash
+bash ./codecov.sh -t fc506ba4-33c3-43e4-a760-aada38c24fd5
+
+exit $status