Skip to content

YPE-1180 Add Android example app build tests#35

Merged
camrun91 merged 7 commits intomainfrom
YPE-1180-rn-android-create-ci-test-to-verify-build
Apr 22, 2026
Merged

YPE-1180 Add Android example app build tests#35
camrun91 merged 7 commits intomainfrom
YPE-1180-rn-android-create-ci-test-to-verify-build

Conversation

@camrun91
Copy link
Copy Markdown
Collaborator

@camrun91 camrun91 commented Jan 29, 2026

Description

We had broken example app builds. This adds the tests to build the Android app.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation update
  • refactor: Code refactoring (no functional changes)
  • perf: Performance improvement
  • test: Test additions or updates
  • build: Build system or dependency changes
  • ci: CI configuration changes
  • chore: Other changes (maintenance, etc.)

Checklist

  • My code follows the project's code style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • All commit messages follow conventional commits format
  • I have updated the appropriate section in documentation (if needed)

Greptile Summary

This PR adds a GitHub Actions workflow that builds the Android example app on every PR targeting main, catching broken builds the way the existing example_ios_build.yml catches iOS regressions. The workflow is well-structured — it has an explicit permissions: contents: read, a 30-minute timeout, and leverages setup-java's built-in Gradle caching, and correctly uses ./gradlew assembleDebug directly from example/android.

Confidence Score: 5/5

Safe to merge — all previous review concerns have been addressed and the only remaining finding is a minor P2 style suggestion.

The workflow correctly uses ./gradlew assembleDebug from example/android, has explicit least-privilege permissions, a 30-minute timeout, and Gradle caching via setup-java. The sole remaining observation (missing --platform android on expo prebuild) is a non-blocking consistency suggestion that won't cause the workflow to fail on Ubuntu.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/android_example_test_build.yml New workflow to build the Android example app on PRs to main; well-structured with timeout, least-privilege permissions, and Java/Gradle caching via setup-java, but expo prebuild is missing the --platform android flag.

Sequence Diagram

sequenceDiagram
    participant PR as Pull Request
    participant GH as GitHub Actions
    participant Ubuntu as ubuntu-latest runner
    participant Node as Node.js 20
    participant Java as Java 17 (Temurin)
    participant Expo as expo prebuild
    participant Gradle as Gradle (assembleDebug)

    PR->>GH: Triggered on PR to main
    GH->>Ubuntu: Spin up runner
    Ubuntu->>Ubuntu: Checkout repository
    Ubuntu->>Node: Setup Node.js 20 (npm cache)
    Ubuntu->>Java: Setup Java 17 (Gradle cache)
    Ubuntu->>Node: npm ci (root deps)
    Ubuntu->>Node: npm ci (example/ deps)
    Node->>Expo: npx expo prebuild
    Expo-->>Ubuntu: Generate example/android/ native project
    Ubuntu->>Gradle: ./gradlew assembleDebug
    Gradle-->>Ubuntu: Build APK (debug)
    Ubuntu-->>GH: Report success/failure
    GH-->>PR: Build status check
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: .github/workflows/android_example_test_build.yml
Line: 39-40

Comment:
**Missing `--platform android` flag on `expo prebuild`**

Without `--platform android`, Expo will generate native files for all configured platforms (both `ios` and `android`). On Ubuntu this means it'll write out an `ios/` directory alongside `android/`, doing unnecessary work and diverging from the pattern in `example_ios_build.yml` which uses `--platform ios`.

```suggestion
        run: npx expo prebuild --platform android
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (4): Last reviewed commit: "fix: cache and build" | Re-trigger Greptile

@camrun91
Copy link
Copy Markdown
Collaborator Author

I believe that the current failure on the added test is legit and shows the failures I was seeing before my changes in the other PR.

@camrun91 camrun91 marked this pull request as ready for review January 29, 2026 21:12
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jan 29, 2026

Greptile Summary

This PR adds a new GitHub Actions workflow (.github/workflows/android_example_test_build.yml) that builds the Android example app on every PR targeting main, addressing a gap where broken Android example app builds were going undetected in CI. The implementation is well-structured with timeout, least-privilege permissions, Gradle caching via setup-java, and correctly uses ./gradlew assembleDebug after expo prebuild. The only minor note is that expo prebuild is called without --platform android, causing the iOS native project directory to also be generated on a Linux runner unnecessarily.

Confidence Score: 5/5

Safe to merge — the workflow is well-structured with all previously raised concerns (timeout, permissions, Gradle caching, working directory) addressed.

All P1 findings from prior review rounds have been resolved. The only remaining finding is a P2 style suggestion (missing --platform android on expo prebuild), which does not affect correctness or merge safety.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/android_example_test_build.yml New workflow that builds the Android example app on every PR to main; correctly uses ./gradlew assembleDebug after expo prebuild, with timeout, least-privilege permissions, and Gradle caching via setup-java. Minor: expo prebuild runs without --platform android, generating the iOS directory unnecessarily on a Linux runner.

Sequence Diagram

sequenceDiagram
    participant GH as GitHub (PR to main)
    participant Runner as ubuntu-latest Runner
    participant Node as Node.js 20
    participant Java as Java 17 (temurin)
    participant Expo as Expo CLI (prebuild)
    participant Gradle as Gradle (assembleDebug)

    GH->>Runner: Trigger on pull_request
    Runner->>Runner: Checkout repository
    Runner->>Node: Setup Node.js 20 + npm cache
    Runner->>Java: Setup Java 17 + Gradle cache
    Runner->>Node: npm ci (root deps)
    Runner->>Node: npm ci (example/ deps)
    Runner->>Expo: npx expo prebuild (generates android/ + ios/)
    Runner->>Gradle: ./gradlew assembleDebug (example/android)
    Gradle-->>Runner: Build success / failure
Loading

Reviews (3): Last reviewed commit: "fix: cache and build" | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment thread .github/workflows/android_example_test_build.yml
Comment thread .github/workflows/android_example_test_build.yml
Comment thread .github/workflows/android_example_test_build.yml
Copy link
Copy Markdown
Collaborator

@bmanquen bmanquen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am learning about android and iOS so take my comments with a grain of salt.

Comment thread .github/workflows/android_example_test_build.yml
Comment thread .github/workflows/android_example_test_build.yml
@bmanquen
Copy link
Copy Markdown
Collaborator

Also I think we can probably test the android and ios builds in one github workflow file as long as they are in different jobs.

Comment thread .github/workflows/android_example_test_build.yml Outdated
Comment thread .github/workflows/android_example_test_build.yml
Comment thread .github/workflows/android_example_test_build.yml Outdated
camrun91 and others added 7 commits April 16, 2026 16:06
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Cameron Llewellyn <cameron.b.llewellyn@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Cameron Llewellyn <cameron.b.llewellyn@gmail.com>
@bmanquen bmanquen force-pushed the YPE-1180-rn-android-create-ci-test-to-verify-build branch from fdb8dd4 to 27f5e9e Compare April 16, 2026 21:06
@camrun91 camrun91 merged commit 655a0f7 into main Apr 22, 2026
4 checks passed
@camrun91 camrun91 deleted the YPE-1180-rn-android-create-ci-test-to-verify-build branch April 22, 2026 19:05
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.

4 participants