From 46f58de5dc830b946805117ea9647ecdbc6f9a1a Mon Sep 17 00:00:00 2001 From: Hy4ri Date: Tue, 16 Jun 2026 00:38:43 +0300 Subject: [PATCH] ci: add GitHub Actions workflow to run lint, test, and build APK --- .github/workflows/android.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/android.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 00000000..c79ff329 --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,43 @@ +name: Android CI/CD + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + name: Build & Test Android App + runs-on: ubuntu-latest + + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + cache: 'gradle' + + - name: Grant Execute Permission for Gradlew + run: chmod +x gradlew + + - name: Run Code Style Check (ktlint) + run: ./gradlew ktlintCheck + + - name: Run Unit & Integration Tests + run: ./gradlew test + + - name: Build Debug APK + run: ./gradlew assembleDebug + + - name: Upload Debug APK Artifact + uses: actions/upload-artifact@v4 + with: + name: hermescontrol-debug-apk + path: app/build/outputs/apk/debug/app-debug.apk + if-no-files-found: error + retention-days: 7