ci: add Android CI/CD workflow
.github/workflows/android-ci.yml: - Triggers on push to main and pull requests - Ubuntu-latest runner with Java 17 (Temurin) - Gradle cache via gradle/actions/setup-gradle - Jobs: assembleDebug build + unit tests (./gradlew test) - Uploads debug APK as workflow artifact (14-day retention) Closes #14
This commit is contained in:
parent
cb576349e0
commit
d97882cfd6
1 changed files with 39 additions and 0 deletions
39
.github/workflows/android-ci.yml
vendored
Normal file
39
.github/workflows/android-ci.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
name: Android CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build & Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 17
|
||||||
|
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
||||||
|
- name: Build debug APK
|
||||||
|
run: ./gradlew assembleDebug
|
||||||
|
|
||||||
|
- name: Run unit tests
|
||||||
|
run: ./gradlew test
|
||||||
|
|
||||||
|
- name: Upload debug APK
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
name: debug-apk
|
||||||
|
path: app/build/outputs/apk/debug/*.apk
|
||||||
|
retention-days: 14
|
||||||
Loading…
Reference in a new issue