chore(ci): add android build test job

This commit is contained in:
plebeius
2025-11-25 22:03:30 +01:00
parent 724b62344b
commit f61c87d180
+48
View File
@@ -235,3 +235,51 @@ jobs:
ls -R dist
exit 1
fi
test-android:
name: Test Android
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js v22
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'yarn'
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-engines
- name: Build React App
run: yarn build
env:
CI: ''
- name: Sync Capacitor
run: npx cap sync android
- name: Build Android APK
run: |
cd android
chmod +x gradlew
./gradlew assembleDebug
- name: Verify APK exists
run: |
APK=$(find android/app/build/outputs/apk -name "*.apk" | head -n 1)
if [ -n "$APK" ]; then
echo "✓ APK built successfully: $APK"
ls -lh "$APK"
else
echo "✗ No APK found"
exit 1
fi