Skip to content

ci+build: GitHub Actions CI, R8/resource shrinking (−82% APK), more unit tests#10

Open
fabiodalez-dev wants to merge 1 commit into
feat/offline-catalog-cachefrom
feat/ci-r8-theme-tests
Open

ci+build: GitHub Actions CI, R8/resource shrinking (−82% APK), more unit tests#10
fabiodalez-dev wants to merge 1 commit into
feat/offline-catalog-cachefrom
feat/ci-r8-theme-tests

Conversation

@fabiodalez-dev

Copy link
Copy Markdown
Owner

First of a series of "make the app production-grade" changes. Stacked on #9 (offline cache) — base is feat/offline-catalog-cache; retarget to main once #9 merges.

What

  • CI — new .github/workflows/android-ci.yml: on every PR/push to main it runs unit tests + Android lint + assembleDebug on JDK 21 with Gradle caching, and uploads reports. The repo had no CI before.
  • R8 + resource shrinkingisMinifyEnabled = true + isShrinkResources = true for release. Keep rules already existed in proguard-rules.pro; assembleRelease runs R8 cleanly and the APK drops 24 MB → 4.3 MB (−82%).
  • TestsDateFormatTest (8 cases) for the locale/zone-aware date formatting. Full unit suite now 37 green.

Verified

  • assembleRelease (R8 + shrink) builds; release APK 4.3 MB.
  • testDebugUnitTest 37/37 green.

Note

A minified release should get one device/emulator smoke-test (login → catalog → loan request) before shipping — reflection-based runtime breakage can't be caught at build time.

…t tests

- CI: add .github/workflows/android-ci.yml — on every PR/push to main it runs
  unit tests, Android lint, and assembleDebug on JDK 21 with Gradle caching,
  and uploads test/lint reports. The repo had no CI before.
- Release build: enable R8 (`isMinifyEnabled`) + `isShrinkResources`. The keep
  rules for Retrofit/OkHttp/kotlinx.serialization/Coil/Room already lived in
  proguard-rules.pro; `assembleRelease` now runs R8 cleanly and the APK drops
  from ~24 MB (debug) to ~4.3 MB (−82%). A minified release should still get one
  device smoke-test before shipping (reflection breakage only shows at runtime).
- Tests: add DateFormatTest (8 cases) for the locale/zone-aware date formatting
  used in loans/profile/notifications — em-dash on empty, raw passthrough on
  parse failure, formatted output otherwise. Full unit suite: 37 green.

Verified: assembleRelease (R8) builds; testDebugUnitTest 37/37 green.
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@fabiodalez-dev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 008a5014-4c1c-4876-96d1-4eb463a6863a

📥 Commits

Reviewing files that changed from the base of the PR and between 7923205 and 9be3535.

📒 Files selected for processing (3)
  • .github/workflows/android-ci.yml
  • app/build.gradle.kts
  • app/src/test/java/com/pinakes/app/DateFormatTest.kt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ci-r8-theme-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fabiodalez-dev

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant