diff --git a/.github/workflows/nightlyReports.yml b/.github/workflows/nightlyReports.yml index 56b52da769..65a2717f36 100644 --- a/.github/workflows/nightlyReports.yml +++ b/.github/workflows/nightlyReports.yml @@ -33,7 +33,7 @@ jobs: run: ./gradlew verifyPaparazziDebug $CI_GRADLE_ARG_PROPERTIES - name: ๐Ÿ“ˆ Generate kover report and verify coverage - run: ./gradlew :app:koverHtmlReport :app:koverXmlReport :app:koverVerify $CI_GRADLE_ARG_PROPERTIES -Pci-build=true + run: ./gradlew :app:koverXmlReportGplayDebug :app:koverHtmlReportGplayDebug :app:koverVerifyGplayDebug $CI_GRADLE_ARG_PROPERTIES - name: โœ… Upload kover report if: always() diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 89ca5047e7..4952ac435c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,14 +48,14 @@ jobs: with: cache-read-only: ${{ github.ref != 'refs/heads/develop' }} - - name: โš™๏ธ Run unit tests, debug and release - run: ./gradlew test $CI_GRADLE_ARG_PROPERTIES + - name: โš™๏ธ Run unit tests for debug variant + run: ./gradlew testDebugUnitTest $CI_GRADLE_ARG_PROPERTIES - name: ๐Ÿ“ธ Run screenshot tests run: ./gradlew verifyPaparazziDebug $CI_GRADLE_ARG_PROPERTIES - name: ๐Ÿ“ˆGenerate kover report and verify coverage - run: ./gradlew :app:koverHtmlReport :app:koverXmlReport :app:koverVerify $CI_GRADLE_ARG_PROPERTIES -Pci-build=true + run: ./gradlew :app:koverXmlReportGplayDebug :app:koverHtmlReportGplayDebug :app:koverVerifyGplayDebug $CI_GRADLE_ARG_PROPERTIES - name: ๐Ÿšซ Upload kover failed coverage reports if: failure() @@ -63,7 +63,7 @@ jobs: with: name: kover-error-report path: | - app/build/reports/kover/verify.err + app/build/reports/kover/verifyGplayDebug.err - name: โœ… Upload kover report (disabled) if: always() @@ -85,5 +85,5 @@ jobs: with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} -# with: -# files: build/reports/kover/xml/report.xml + files: app/build/reports/kover/reportGplayDebug.xml + verbose: true diff --git a/app/build.gradle.kts b/app/build.gradle.kts index aad1c4eff6..e3f34f9ea6 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -24,7 +24,6 @@ import extension.gitBranchName import extension.gitRevision import extension.koverDependencies import extension.setupKover -import org.jetbrains.kotlin.cli.common.toBooleanLenient plugins { id("io.element.android-compose-application") @@ -189,7 +188,7 @@ androidComponents { val abiCode = abiVersionCodes[name] ?: 0 // Assigns the new version code to output.versionCode, which changes the version code // for only the output APK, not for the variant itself. - output.versionCode.set((output.versionCode.get() ?: 0) * 10 + abiCode) + output.versionCode.set((output.versionCode.orNull ?: 0) * 10 + abiCode) } } } @@ -215,26 +214,6 @@ knit { } } -val ciBuildProperty = "ci-build" -val isCiBuild = if (project.hasProperty(ciBuildProperty)) { - val raw = project.property(ciBuildProperty) as? String - raw?.toBooleanLenient() == true || raw?.toIntOrNull() == 1 -} else { - false -} - -kover { - // When running on the CI, run only debug test variants - if (isCiBuild) { - excludeTests { - // Disable instrumentation for debug test tasks - tasks( - "testDebugUnitTest", - ) - } - } -} - dependencies { allLibrariesImpl() allServicesImpl() diff --git a/plugins/src/main/kotlin/extension/KoverExtension.kt b/plugins/src/main/kotlin/extension/KoverExtension.kt index cfcd18abf9..e107291918 100644 --- a/plugins/src/main/kotlin/extension/KoverExtension.kt +++ b/plugins/src/main/kotlin/extension/KoverExtension.kt @@ -100,7 +100,6 @@ fun Project.setupKover() { defaults { // add reports of both 'debug' and 'release' Android build variants to default reports mergeWith("gplayDebug") - mergeWith("gplayRelease") verify { onCheck = true @@ -203,8 +202,6 @@ fun Project.setupKover() { } } } - - androidReports("gplayRelease") {} } }