Skip to content

ci: Flashlight integration github action #377

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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

behnam-deriv
Copy link
Contributor

@behnam-deriv behnam-deriv commented May 2, 2025

Clickup link: https://app.clickup.com/t/20696747/GRWT-3994
Fixes issue: #

This PR contains the following changes:

  • ✨ New feature (non-breaking change which adds functionality)
  • πŸ› οΈ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • βœ… Build configuration change
  • πŸ“ Documentation
  • πŸ—‘οΈ Chore

Developers Note (Optional)

Pre-launch Checklist (For PR creator)

As a creator of this PR:

  • ✍️ I have included clickup id and package/app_name in the PR title.
  • πŸ‘οΈ I have gone through the code and removed any temporary changes (commented lines, prints, debug statements etc.).
  • βš’οΈ I have fixed any errors/warnings shown by the analyzer/linter.
  • πŸ“ I have added documentation, comments and logging wherever required.
  • πŸ§ͺ I have added necessary tests for these changes.
  • πŸ”Ž I have ensured all existing tests are passing.

Reviewers

Pre-launch Checklist (For Reviewers)

As a reviewer I ensure that:

  • ✴️ This PR follows the standard PR template.
  • πŸͺ© The information in this PR properly reflects the code changes.
  • πŸ§ͺ All the necessary tests for this PR's are passing.

Pre-launch Checklist (For QA)

  • πŸ‘Œ It passes the acceptance criteria.

Pre-launch Checklist (For Maintainer)

  • [MAINTAINER_NAME] I make sure this PR fulfills its purpose.

Summary by Sourcery

Add Flashlight integration GitHub Action for automated mobile app testing

New Features:

  • Implemented Flashlight cloud testing for Android app

CI:

  • Added GitHub workflow to upload APK artifact
  • Integrated Flashlight CLI for mobile app testing
  • Added workflow dispatch trigger for manual workflow runs

Deployment:

  • Added step to upload APK artifact with 1-day retention

Chores:

  • Added internet permission to Android manifest

Copy link

sourcery-ai bot commented May 2, 2025

Reviewer's Guide

This pull request integrates Flashlight performance testing by adding a new manually triggered job (workflow_dispatch) to the existing GitHub Actions workflow (main.yaml). This job downloads the APK artifact produced by the preceding build job, installs the Flashlight CLI, and then uploads the APK to Flashlight Cloud, executing a basic Maestro test (.maestro/launch_app.yaml) added in this PR. Necessary internet permissions were also added to the Android manifest.

File-Level Changes

Change Details Files
Integrated Flashlight testing into the GitHub Actions workflow.
  • Added a new flashlight-test job that runs on manual trigger (workflow_dispatch).
  • Configured the build job to upload the APK as an artifact.
  • Added steps in flashlight-test to download the APK, install the Flashlight CLI, and execute the performance test.
.github/workflows/main.yaml
Added Maestro test script for app launch.
  • Created basic test script to clear state, launch app, and assert visibility.
.maestro/launch_app.yaml
Added required internet permission for the Android app.
  • Included android.permission.INTERNET in AndroidManifest.xml.
example/android/app/src/main/AndroidManifest.xml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @behnam-deriv - I've reviewed your changes - here's some feedback:

  • Consider running the Flashlight test job automatically on pull requests for earlier feedback.
Here's what I looked at during the review
  • 🟑 General issues: 1 issue found
  • 🟒 Security: all looks good
  • 🟒 Review instructions: all looks good
  • 🟒 Testing: all looks good
  • 🟒 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click πŸ‘ or πŸ‘Ž on each comment and I'll use the feedback to improve your reviews.

- name: πŸ“‹ List Downloaded Files
run: ls -la apk/

- name: πŸ”§ Install Flashlight CLI
Copy link

Choose a reason for hiding this comment

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

suggestion (bug_risk): Consider pinning the Flashlight CLI installer version.

Pin the installer to a specific version to prevent unexpected CLI changes and ensure consistent, reproducible builds.

Suggested implementation:

          curl https://get.flashlight.dev/v1.2.3 | bash

If a different version should be used, update "v1.2.3" accordingly. Also, ensure that the pinned version is available and supported by the Flashlight CLI team.

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.

1 participant