Skip to content

Commit f61c87d

Browse files
committed
chore(ci): add android build test job
1 parent 724b623 commit f61c87d

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/test.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,51 @@ jobs:
235235
ls -R dist
236236
exit 1
237237
fi
238+
239+
test-android:
240+
name: Test Android
241+
runs-on: ubuntu-22.04
242+
steps:
243+
- uses: actions/checkout@v4
244+
with:
245+
fetch-depth: 0
246+
247+
- name: Setup Node.js v22
248+
uses: actions/setup-node@v4
249+
with:
250+
node-version: 22
251+
cache: 'yarn'
252+
253+
- name: Setup Java 17
254+
uses: actions/setup-java@v4
255+
with:
256+
distribution: 'temurin'
257+
java-version: '17'
258+
259+
- name: Install dependencies
260+
run: yarn install --frozen-lockfile --ignore-engines
261+
262+
- name: Build React App
263+
run: yarn build
264+
env:
265+
CI: ''
266+
267+
- name: Sync Capacitor
268+
run: npx cap sync android
269+
270+
- name: Build Android APK
271+
run: |
272+
cd android
273+
chmod +x gradlew
274+
./gradlew assembleDebug
275+
276+
- name: Verify APK exists
277+
run: |
278+
APK=$(find android/app/build/outputs/apk -name "*.apk" | head -n 1)
279+
if [ -n "$APK" ]; then
280+
echo "✓ APK built successfully: $APK"
281+
ls -lh "$APK"
282+
else
283+
echo "✗ No APK found"
284+
exit 1
285+
fi

0 commit comments

Comments
 (0)