summaryrefslogtreecommitdiff
path: root/.github/workflows/android.yml
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-25 18:18:17 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-25 18:18:17 +0000
commitea5cdac728263fdc48b480460f3362a7f5fe221d (patch)
tree880fb6608535f5a95cad8fbf82c785dd2cb0e8b3 /.github/workflows/android.yml
parentca57e40adc0b89e7dc5409475f7510c0c188d715 (diff)
test(ci): share APKs between jobs and expand smoke tests
CI — build job now uploads both APKs as the 'test-apks' artifact. smoke-test job downloads them and passes -x assembleDebug -x assembleDebugAndroidTest to skip recompilation (~4 min saved). Test results uploaded as 'smoke-test-results' artifact on every run. Smoke tests expanded from 1 → 11 tests covering: - MainActivity launches without crash - All 4 bottom-nav tabs are displayed - Safety tab: Safety Dashboard, ACTIVATE MOB, ANCHOR WATCH visible - Log tab: voice-log mic FAB visible - Instruments tab: bottom sheet displayed - Map tab: returns from overlay, mapView visible - MOB FAB: always visible, visible on Safety tab - Record Track FAB: displayed, toggles to Stop Recording, toggles back MainActivity: moved isRecording observer to initializeUI() so the FAB content description updates without requiring GPS permission (needed for emulator tests that run without location permission). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to '.github/workflows/android.yml')
-rw-r--r--.github/workflows/android.yml29
1 files changed, 26 insertions, 3 deletions
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index 12b0bc9..150da6f 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -27,12 +27,20 @@ jobs:
run: ./gradlew assembleDebug assembleDebugAndroidTest
working-directory: android-app
- - name: Upload artifact
+ - name: Upload app APK (Firebase / manual download)
uses: actions/upload-artifact@v4
with:
name: app-debug
path: android-app/app/build/outputs/apk/debug/app-debug.apk
+ - name: Upload test APKs (shared with smoke-test job)
+ uses: actions/upload-artifact@v4
+ with:
+ name: test-apks
+ path: |
+ android-app/app/build/outputs/apk/debug/app-debug.apk
+ android-app/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
+
- name: upload artifact to Firebase App Distribution
if: github.ref == 'refs/heads/main'
uses: wzieba/Firebase-Distribution-Github-Action@v1
@@ -66,7 +74,7 @@ jobs:
smoke-test:
runs-on: ubuntu-latest
- # Run after build succeeds so we don't spin up an emulator for a broken build
+ # Run after build succeeds — no point spinning up an emulator for a broken build
needs: build
steps:
@@ -82,21 +90,36 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x android-app/gradlew
+ # Restore pre-built APKs so the emulator job skips the compile step
+ - name: Download test APKs
+ uses: actions/download-artifact@v4
+ with:
+ name: test-apks
+ path: . # preserves android-app/app/build/outputs/… directory structure
+
- name: Enable KVM (faster emulator)
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
+ # -x assembleDebug -x assembleDebugAndroidTest: skip recompile, use downloaded APKs
- name: Run smoke tests on emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
arch: x86_64
profile: pixel_3a
- script: ./gradlew connectedDebugAndroidTest
+ script: ./gradlew connectedDebugAndroidTest -x assembleDebug -x assembleDebugAndroidTest
working-directory: android-app
+ - name: Upload test results
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: smoke-test-results
+ path: android-app/app/build/outputs/androidTest-results/
+
- name: Notify claudomator
if: always()
env: