summaryrefslogtreecommitdiff
path: root/.github/workflows/android.yml
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-06-29 02:53:36 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-06-29 02:53:36 +0000
commit5b180030a7a8553a96cc325683380f1810e3fdd8 (patch)
tree65de58171fa9bdada805365695436ac799b1a6f3 /.github/workflows/android.yml
parent0c8b95cb54b2b0d9707357037d1839d24c22ab19 (diff)
ci: add GitHub Actions workflow to build and test Android widget APK
Diffstat (limited to '.github/workflows/android.yml')
-rw-r--r--.github/workflows/android.yml58
1 files changed, 58 insertions, 0 deletions
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
new file mode 100644
index 0000000..35aabeb
--- /dev/null
+++ b/.github/workflows/android.yml
@@ -0,0 +1,58 @@
+name: Android Widget
+
+on:
+ push:
+ paths:
+ - 'android/**'
+ pull_request:
+ paths:
+ - 'android/**'
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+
+ - name: Install Gradle 8.6
+ run: |
+ wget -q https://services.gradle.org/distributions/gradle-8.6-bin.zip -O /tmp/gradle.zip
+ sudo unzip -q /tmp/gradle.zip -d /opt/gradle
+
+ - name: Cache Gradle dependencies
+ uses: actions/cache@v4
+ with:
+ path: ~/.gradle/caches
+ key: ${{ runner.os }}-gradle-${{ hashFiles('android/**/*.gradle.kts') }}
+ restore-keys: |
+ ${{ runner.os }}-gradle-
+
+ - name: Run unit tests
+ working-directory: android
+ run: ./gradlew :app:testDebugUnitTest
+
+ - name: Upload test report
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: test-report
+ path: android/app/build/reports/tests/
+
+ - name: Build debug APK
+ working-directory: android
+ run: ./gradlew :app:assembleDebug
+
+ - name: Upload APK
+ uses: actions/upload-artifact@v4
+ with:
+ name: doot-widget-debug
+ path: android/app/build/outputs/apk/debug/app-debug.apk
+ retention-days: 30