diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 34676b58ed..9775ffd03d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,6 +49,7 @@ jobs: emulator-build: 7425822 script: ./gradlew theCodeCoverageReport --stacktrace $CI_GRADLE_ARG_PROPERTIES - run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES + if: always() # upload even if test suite fails, will be missing coverage report (but will also report coverage drop and quality gate will kick in) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/InstrumentedTest.kt b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/InstrumentedTest.kt index a763766821..0014c19cc6 100644 --- a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/InstrumentedTest.kt +++ b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/InstrumentedTest.kt @@ -19,10 +19,15 @@ package org.matrix.android.sdk import android.content.Context import androidx.test.core.app.ApplicationProvider import org.junit.Rule +import org.matrix.android.sdk.common.RetryTestRule import org.matrix.android.sdk.test.shared.createTimberTestRule interface InstrumentedTest { + @Rule + fun retryTestRule() = RetryTestRule(3) + + @Rule fun timberTestRule() = createTimberTestRule()