From 1753a518c65f180d79d9311ae32a57643300f2e6 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 25 Jul 2026 12:20:49 +0000 Subject: [PATCH 1/2] ci: make the i18n check block, and drop coverage that nothing reads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three cleanups to CI, following a pass over what each check actually buys. i18n-check never failed. It has no `exit 1` — it only emitted `::warning` annotations, so it was structurally incapable of going red. It was also right about something nobody acted on: `model_visibility_title`, `_row` and `_caption` were missing from all six non-Japanese locales for long enough to ship. A check that stays green while the thing it checks is broken costs more trust than it earns, so missing keys are now errors and fail the job. Verified against the current tree first — there are no gaps today, so this does not turn main red on landing. The jacoco coverage report had no threshold, no badge, no README mention and no upload to any coverage service. It generated HTML into an artifact that nobody opens. Removed the report task, the plugin and both workflow steps; if coverage is wanted later it should come back with a rule that can actually fail. `.last-release` was left over from v0.2.0 (`tag=v0.2.0`, a source_sha and a workflow_run id) and no workflow, script or doc reads it. release.yml resolves the tag from `.release-version`. Verified `testDebugUnitTest`, `lintDebug`, `assembleDebug`, `detekt` and `spotlessCheck`, and dry-ran the new i18n gate against the current resources. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01L3eN8AmoAcBDCTEeMTY3ba --- .github/workflows/android.yml | 10 -------- .github/workflows/i18n-check.yml | 10 ++++---- .last-release | 3 --- app/build.gradle.kts | 39 -------------------------------- 4 files changed, 6 insertions(+), 56 deletions(-) delete mode 100644 .last-release diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 1df6bfb4..27be4a44 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 619c9c7e..6c373550 100644 --- a/.github/workflows/i18n-check.yml +++ b/.github/workflows/i18n-check.yml @@ -26,7 +26,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 +38,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 d5a7ff3f..00000000 --- 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 a4b9f822..7ded624f 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") - }, - ) -} From fda58c3c588b29d4ed71cef9fe87bb0b6b8b9aa6 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 25 Jul 2026 12:42:54 +0000 Subject: [PATCH 2/2] ci: run the i18n check when the i18n check itself changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Its path filter only listed the string resources, so the previous commit — which changes what the job does — did not run it. Adding the workflow's own path means this push exercises the new blocking behaviour against the real resources instead of only the local dry run. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01L3eN8AmoAcBDCTEeMTY3ba --- .github/workflows/i18n-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/i18n-check.yml b/.github/workflows/i18n-check.yml index 6c373550..df274e9e 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: