From e75fd1c7daa51058f5f836087bc04ad544a1edfe Mon Sep 17 00:00:00 2001 From: nian1 Date: Mon, 26 Aug 2024 05:04:02 +0800 Subject: [PATCH 1/2] feat(build): enable Android resources for unit tests --- app/build.gradle.kts | 7 +++++++ library/build.gradle.kts | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0709df9..87c959a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -15,11 +15,18 @@ android { versionName = "1.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + vectorDrawables { useSupportLibrary = true } } + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } + buildTypes { release { isDebuggable = false diff --git a/library/build.gradle.kts b/library/build.gradle.kts index 8aaf440..2ff9ae9 100644 --- a/library/build.gradle.kts +++ b/library/build.gradle.kts @@ -14,6 +14,12 @@ android { consumerProguardFiles("consumer-rules.pro") } + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } + buildTypes { release { isMinifyEnabled = false From 21ad68e94f64e974a8a1c8c4165e77dacd8a3b11 Mon Sep 17 00:00:00 2001 From: nian1 Date: Mon, 26 Aug 2024 05:04:19 +0800 Subject: [PATCH 2/2] feat(ci): Upgrade to latest GitHub Actions versions --- .github/workflows/android.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index ae91a60..7e44dfc 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up JDK uses: actions/setup-java@v4 @@ -36,8 +36,10 @@ jobs: run: ./gradlew test - name: Upload test results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: always() with: name: test-results - path: "**/build/test-results/test" + path: | + **/build/test-results + **/build/reports/tests