Create workflow to build Android LeapChat#26
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR creates a comprehensive CI/CD workflow for building and testing the Android LeapChat application. It introduces test automation capabilities with Firebase Test Lab integration and adds tool functionality features.
- Adds GitHub Actions workflow for automated building and end-to-end testing
- Implements UI testing framework with test tags and E2E test cases
- Introduces tool toggle functionality with conditional function registration
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/android-leap-chat-test.yml | New CI workflow for building and testing Android app on Firebase Test Lab |
| Android/LeapChat/app/src/androidTest/java/ai/liquid/leapchat/MainActivityTest.kt | New E2E test class for chat functionality validation |
| Android/LeapChat/app/src/main/java/ai/liquid/leapchat/MainActivity.kt | Added tool toggle UI, test tags, and model configuration changes |
| Android/LeapChat/app/src/main/java/ai/liquid/leapchat/views/AssistantMessage.kt | Added test tags for UI testing |
| Android/LeapChat/app/src/main/res/values/strings.xml | Added strings for tool toggle button labels |
| Android/LeapChat/gradle/libs.versions.toml | Updated Leap SDK version from 0.4.0 to 0.5.0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| - name: Run E2E test on Firebase Test Lab | ||
| run: | | ||
| echo "$SERVICE_ACCOUNT" > /tmp/service_account.json | ||
| gcloud auth activate-service-account --key-file=/tmp/service_account.json |
There was a problem hiding this comment.
The service account key is written to a temporary file without proper cleanup. Consider using stdin for authentication or ensure the file is securely deleted after use.
| gcloud auth activate-service-account --key-file=/tmp/service_account.json | |
| gcloud auth activate-service-account --key-file=/tmp/service_account.json | |
| rm /tmp/service_account.json |
There was a problem hiding this comment.
Not necessary as the environment will be cleaned up by Github Action runners.
| const val MODEL_SLUG = "lfm2-350m" | ||
| const val QUANTIZATION_SLUG = "lfm2-350m-20250710-8da4w" |
There was a problem hiding this comment.
[nitpick] Switching from lfm2-1.2b to lfm2-350m represents a significant reduction in model size (1.2B to 350M parameters). While this improves performance and reduces resource usage, ensure this change aligns with the required model capabilities for the application.
| const val MODEL_SLUG = "lfm2-350m" | |
| const val QUANTIZATION_SLUG = "lfm2-350m-20250710-8da4w" | |
| /** | |
| * Model slug for LeapChat. Default is "lfm2-350m" (350M parameters). | |
| * Note: Switching from a larger model (e.g., "lfm2-1.2b") to "lfm2-350m" reduces resource usage | |
| * but may impact language understanding and generation quality. Ensure this aligns with your application's needs. | |
| * To use a different model, set the value via configuration or environment variable if supported. | |
| */ | |
| val MODEL_SLUG: String = System.getenv("LEAPCHAT_MODEL_SLUG") ?: "lfm2-350m" | |
| /** | |
| * Quantization slug for the selected model. | |
| * Update this value if you change the model slug. | |
| */ | |
| val QUANTIZATION_SLUG: String = System.getenv("LEAPCHAT_QUANTIZATION_SLUG") ?: "lfm2-350m-20250710-8da4w" |
Create the E2E test flow for Android LeapChat example app. Changes are