From a95ce202616b41d4ab98b46f692e0d357f632f98 Mon Sep 17 00:00:00 2001 From: Ndiritu Date: Wed, 2 Oct 2024 18:09:53 +0300 Subject: [PATCH 1/4] fix workflow --- ...n-lint-and-tests-and-generate-artifact.yml | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-lint-and-tests-and-generate-artifact.yml b/.github/workflows/run-lint-and-tests-and-generate-artifact.yml index 907f468..d709544 100644 --- a/.github/workflows/run-lint-and-tests-and-generate-artifact.yml +++ b/.github/workflows/run-lint-and-tests-and-generate-artifact.yml @@ -46,11 +46,7 @@ jobs: distribution: 'zulu' java-version: '17' - - name: Get local.properties from secrets - run: echo "${{secrets.ProjectSecrets }}" > $GITHUB_WORKSPACE/local.properties - - name: Make gradlew executable - run: chmod +x ./gradlew @@ -60,9 +56,35 @@ jobs: + + + + # Job that assembles debug apk + run-debug-assemble: + name: Unit Tests + runs-on: ubuntu-latest + steps: + - name: Checkout the code + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + - name: Get local.properties from secrets + run: echo "${{secrets.ProjectSecrets }}" > $GITHUB_WORKSPACE/local.properties + + - name: Make gradlew executable + run: chmod +x ./gradlew + + + - name: Assemble debug + run: ./gradlew assembleDebug + - name: Upload a Build Artifact uses: actions/upload-artifact@v4.3.3 with: - name: GitIssues.apk - path: app/build/outputs/apk/debug/app-debug.apk + name: GitIssues.apk + path: app/build/outputs/apk/debug/app-debug.apk From 3be0589e14968e4346a0f3f72046065988eae866 Mon Sep 17 00:00:00 2001 From: Ndiritu Date: Wed, 2 Oct 2024 18:37:21 +0300 Subject: [PATCH 2/4] fix jacoco exclusions --- .../src/main/kotlin/com/devmike/gitissuesmobile/Jacoco.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build-logic/convention/src/main/kotlin/com/devmike/gitissuesmobile/Jacoco.kt b/build-logic/convention/src/main/kotlin/com/devmike/gitissuesmobile/Jacoco.kt index d85aa23..52c637d 100644 --- a/build-logic/convention/src/main/kotlin/com/devmike/gitissuesmobile/Jacoco.kt +++ b/build-logic/convention/src/main/kotlin/com/devmike/gitissuesmobile/Jacoco.kt @@ -25,6 +25,14 @@ private val coverageExclusions = "**/Manifest*.*", "**/*_Hilt*.class", "**/Hilt_*.class", + "**/*Binding*.*", + "**/di/**", // Exclude DI folders + "**/*_Impl.java", // Exclude Room generated classes + "**/Generated*.class", + "**/*_Impl.class", + "**/Generated*.class", // Exclude Apollo generated classes + "**/*Database$*", + "**/*Database_*", ) private fun String.capitalize() = From db1ebebf7f20c6cab9b088a78c650631affd42b0 Mon Sep 17 00:00:00 2001 From: Ndiritu Date: Wed, 2 Oct 2024 18:50:36 +0300 Subject: [PATCH 3/4] fix jacoco exclusions --- .../workflows/run-lint-and-tests-and-generate-artifact.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/run-lint-and-tests-and-generate-artifact.yml b/.github/workflows/run-lint-and-tests-and-generate-artifact.yml index d709544..ac40fec 100644 --- a/.github/workflows/run-lint-and-tests-and-generate-artifact.yml +++ b/.github/workflows/run-lint-and-tests-and-generate-artifact.yml @@ -48,6 +48,11 @@ jobs: + - name: Make gradlew executable + run: chmod +x ./gradlew + + + - name: Run Unit Tests @@ -59,6 +64,8 @@ jobs: + + # Job that assembles debug apk run-debug-assemble: name: Unit Tests From f2094c30a449812b09917c13415c38cfbec3adf4 Mon Sep 17 00:00:00 2001 From: Ndiritu Date: Wed, 2 Oct 2024 19:04:30 +0300 Subject: [PATCH 4/4] fix failing action --- .../workflows/run-lint-and-tests-and-generate-artifact.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-lint-and-tests-and-generate-artifact.yml b/.github/workflows/run-lint-and-tests-and-generate-artifact.yml index ac40fec..0dd17c1 100644 --- a/.github/workflows/run-lint-and-tests-and-generate-artifact.yml +++ b/.github/workflows/run-lint-and-tests-and-generate-artifact.yml @@ -51,6 +51,8 @@ jobs: - name: Make gradlew executable run: chmod +x ./gradlew + - name: Get local.properties from secrets + run: echo "${{secrets.ProjectSecrets }}" > $GITHUB_WORKSPACE/local.properties @@ -68,7 +70,7 @@ jobs: # Job that assembles debug apk run-debug-assemble: - name: Unit Tests + name: Debug Build runs-on: ubuntu-latest steps: - name: Checkout the code