From 42be961681bbb797d704e819c2bcd2974f9417d9 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 14 Jun 2022 18:35:22 +0100 Subject: [PATCH] applying sanity test filter to the start params --- .github/workflows/tests.yml | 4 ++-- coverage.gradle | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3446c7e641..e803319423 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -51,7 +51,7 @@ jobs: emulator-build: 7425822 script: | ./gradlew unitTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES - ./gradlew instrumentationTestsWithCoverage -Pandroid.testInstrumentationRunnerArguments.notPackage=im.vector.app.ui --stacktrace $CI_GRADLE_ARG_PROPERTIES + ./gradlew instrumentationTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES ./gradlew generateCoverageReport --stacktrace $CI_GRADLE_ARG_PROPERTIES # NB: continue-on-error marks steps.tests.conclusion = 'success' but leaves stes.tests.outcome = 'failure' - name: Run all the codecoverage tests at once (retry if emulator failed) @@ -67,7 +67,7 @@ jobs: emulator-build: 7425822 script: | ./gradlew unitTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES - ./gradlew instrumentationTestsWithCoverage -Pandroid.testInstrumentationRunnerArguments.notPackage=im.vector.app.ui --stacktrace $CI_GRADLE_ARG_PROPERTIES + ./gradlew instrumentationTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES ./gradlew generateCoverageReport --stacktrace $CI_GRADLE_ARG_PROPERTIES - run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES if: always() # we may have failed a previous step and retried, that's OK diff --git a/coverage.gradle b/coverage.gradle index be30047afd..f278a475ef 100644 --- a/coverage.gradle +++ b/coverage.gradle @@ -85,5 +85,6 @@ task unitTestsWithCoverage(type: GradleBuild) { task instrumentationTestsWithCoverage(type: GradleBuild) { startParameter.projectProperties.coverage = [enableTestCoverage: true] + startParameter.projectProperties['android.testInstrumentationRunnerArguments.notPackage'] = 'im.vector.app.ui' tasks = [':vector:connectedGplayDebugAndroidTest', 'matrix-sdk-android:connectedDebugAndroidTest'] }