diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 1df6bfb..27be4a4 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -75,16 +75,6 @@ jobs: if: github.event_name == 'push' run: ./gradlew :app:assembleRelease - - name: Generate coverage report - run: ./gradlew :app:jacocoTestReport - - - name: Upload coverage report - uses: actions/upload-artifact@v4 - with: - name: jacoco-coverage-report - path: app/build/reports/jacoco/ - if-no-files-found: error - - name: Upload debug APK uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/i18n-check.yml b/.github/workflows/i18n-check.yml index 619c9c7..df274e9 100644 --- a/.github/workflows/i18n-check.yml +++ b/.github/workflows/i18n-check.yml @@ -4,6 +4,8 @@ on: pull_request: paths: - "app/src/main/res/values*/strings.xml" + # Without this, a change to the check itself never runs the check. + - ".github/workflows/i18n-check.yml" jobs: check-translations: @@ -26,7 +28,7 @@ jobs: if [ -n "$missing" ]; then count=$(echo "$missing" | wc -l | tr -d ' ') - echo "::warning file=$file::[$lang] Missing $count translation(s): $(echo $missing | tr '\n' ' ')" + echo "::error file=$file::[$lang] Missing $count translation(s): $(echo $missing | tr '\n' ' ')" MISSING_FOUND=1 fi @@ -38,7 +40,9 @@ jobs: if [ "$MISSING_FOUND" -eq 1 ]; then echo "" - echo "Some translations are incomplete. See warnings above." - else - echo "All translations are complete." + echo "Some translations are incomplete. See the errors above." + echo "Add the missing keys to every values-*/strings.xml, or remove them from the source." + exit 1 fi + + echo "All translations are complete." diff --git a/.last-release b/.last-release deleted file mode 100644 index d5a7ff3..0000000 --- a/.last-release +++ /dev/null @@ -1,3 +0,0 @@ -tag=v0.2.0 -source_sha=da6b778811ca61162a8339933ba37785c6f9b195 -workflow_run=29745485309 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a4b9f82..7ded624 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -5,7 +5,6 @@ plugins { id("org.jetbrains.kotlin.plugin.serialization") id("com.google.devtools.ksp") id("androidx.baselineprofile") - id("jacoco") } val repoRoot = rootProject.projectDir @@ -242,41 +241,3 @@ dependencies { debugImplementation("androidx.compose.ui:ui-tooling") debugImplementation("androidx.compose.ui:ui-test-manifest") } - -// The base jacoco plugin only wires a report task to the JVM `test` task, which an Android module -// does not have — so `:app:jacocoTestReport` did not exist and CI's coverage step failed outright. -tasks.register("jacocoTestReport") { - dependsOn("testDebugUnitTest") - group = "verification" - description = "Generates a coverage report for the debug unit tests." - - reports { - html.required.set(true) - xml.required.set(true) - } - - val generated = - listOf( - "**/R.class", - "**/R$*.class", - "**/BuildConfig.*", - "**/Manifest*.*", - "**/*Test*.*", - "**/*_Factory*.*", - "**/*Composable*.*", - "**/*\$\$serializer.*", - ) - classDirectories.setFrom( - fileTree(layout.buildDirectory.dir("tmp/kotlin-classes/debug")) { exclude(generated) }, - ) - sourceDirectories.setFrom(files("src/main/java")) - // Only the unit test coverage directories, never the whole build directory: scanning that - // makes Gradle treat every other task's output as an undeclared input of this one, which fails - // the build as soon as a release variant is assembled in the same invocation. - executionData.setFrom( - fileTree(layout.buildDirectory.dir("jacoco")) { include("*.exec") }, - fileTree(layout.buildDirectory.dir("outputs/unit_test_code_coverage")) { - include("**/*.exec") - }, - ) -}