Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Android unit tests for plugin and example in CI. #9

Merged
merged 9 commits into from
Jan 24, 2025
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ jobs:
flutter-version: 3.x
- run: flutter --version

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

- name: Set up local.properties
run: bash .github/workflows/create_properties.sh

- name: Install dependencies
run: flutter pub get

Expand All @@ -48,6 +60,9 @@ jobs:
- name: Run example app tests
run: cd example && flutter test

- name: Run Android unit tests
run: cd example/android && gradle test

- name: Test docs generation
run: dart doc --dry-run

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/create_properties.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /bin/bash

# Generate a local.properties file sufficient to build and run Android unit tests.
# Run from project root directory.
echo "FSOrgId=TEST" > example/android/local.properties
FLUTTER_BIN=$(dirname "$(which flutter)")
echo "flutter.sdk=$FLUTTER_BIN/.." >> example/android/local.properties
Loading