Skip to content

YPE-1180 Add Android example app build tests#35

Open
camrun91 wants to merge 10 commits intomainfrom
YPE-1180-rn-android-create-ci-test-to-verify-build
Open

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

Conversation

@camrun91
Copy link
Copy Markdown
Collaborator

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)

@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

camrun91 and others added 2 commits January 29, 2026 15:19
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>
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.

@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.


- name: Build Android app
working-directory: example/android
run: ./gradlew assembleDebug --no-daemon
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This works! You could also set the working-directory to example and run npm run android.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

When I did that in CI it failed because there was no simulator device.

working-directory: example
run: npm ci

- name: Prebuild Expo app
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Actually, this could also (similar to iOS) be simplified to 1 command: npm run android. It will handle prebuild (creating the Android native directory) and building the app.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I will try this again but I think doing this it was having issues with building since no simulator exists.

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.

3 participants