Skip to content
44 changes: 44 additions & 0 deletions .github/workflows/android_example_test_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test Android Example App Build

on:
pull_request:
branches: [main]

jobs:
test-android-build:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Install dependencies (root)
run: npm ci

- name: Install dependencies (example app)
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.

working-directory: example
run: npx expo prebuild

- name: Build Android app
working-directory: example/android
run: ./gradlew assembleDebug
Loading