ci: add GitHub Actions workflow to run lint, test, and build APK
This commit is contained in:
1 parent
edc2d45966
commit
46f58de5dc
1 file changed
+43
@@ -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
|
||||||
Reference in new issue
Block a user