Skip to content

Add GitHub Actions workflows for Android tests and enforce PR rules f… #1

Add GitHub Actions workflows for Android tests and enforce PR rules f…

Add GitHub Actions workflows for Android tests and enforce PR rules f… #1

Workflow file for this run

name: Android Tests
on:
pull_request:
branches: ["develop"]
jobs:
android-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Create temporary Flutter project
run: |
flutter create --template=app /tmp/test_app
cd /tmp/test_app
# Add the plugin with path dependency
flutter pub add flutter_device_apps_android --path $GITHUB_WORKSPACE
# Build to generate Gradle files
flutter build apk --debug
- name: Run Android unit tests
run: |
cd /tmp/test_app/android
./gradlew :flutter_device_apps_android:testDebugUnitTest