ci: GitHub actions workflow (#8)

* chore: Create GitHub actions workflow to upload debug APK on commit

* build: Log test results while running tests with gradlew

* ci: update jdk version used, only test debug build

* ci: use correct order of execution of tasks (build, test, deploy)
This commit is contained in:
Nishant Mishra
2025-07-14 22:23:26 +05:30
committed by GitHub
parent 3393b8088b
commit 84b98be91c
2 changed files with 41 additions and 0 deletions

31
.github/workflows/android.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: Android CI
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build debug APK with Gradle
run: ./gradlew assembleDebug
- name: Run tests
run: ./gradlew testDebugUnitTest
- name: Upload debug APK artifact
uses: actions/upload-artifact@v4
with:
name: tomato-debug
path: ./app/build/outputs/apk/debug/app-debug.apk