Skip to content

Create workflow to build Android LeapChat#26

Merged
linmx0130 merged 6 commits intomainfrom
mengxiaolin/lea-458-prototype-e2e-tests-on-leapsdk-example-apps
Sep 11, 2025
Merged

Create workflow to build Android LeapChat#26
linmx0130 merged 6 commits intomainfrom
mengxiaolin/lea-458-prototype-e2e-tests-on-leapsdk-example-apps

Conversation

@linmx0130
Copy link
Contributor

@linmx0130 linmx0130 commented Sep 10, 2025

Create the E2E test flow for Android LeapChat example app. Changes are

  1. A new button in the UI to control whether to use tools in the chat.
  2. An E2E test case with 2 turns of chat user interactions.
  3. A new workflow to run the test on Google Firebase Test Lab.

@linmx0130 linmx0130 marked this pull request as ready for review September 11, 2025 18:03
@linmx0130 linmx0130 requested a review from Copilot September 11, 2025 18:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Copilot AI Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary as the environment will be cleaned up by Github Action runners.

Comment on lines +473 to +474
const val MODEL_SLUG = "lfm2-350m"
const val QUANTIZATION_SLUG = "lfm2-350m-20250710-8da4w"
Copy link

Copilot AI Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Suggested change
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"

Copilot uses AI. Check for mistakes.
@linmx0130 linmx0130 merged commit 2f8acf6 into main Sep 11, 2025
1 check passed
@linmx0130 linmx0130 deleted the mengxiaolin/lea-458-prototype-e2e-tests-on-leapsdk-example-apps branch September 11, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants