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

chore: configure workflows for Flutter app #2562

Merged
merged 2 commits into from
Nov 8, 2024

Conversation

AsCress
Copy link
Contributor

@AsCress AsCress commented Nov 3, 2024

Configures the basic workflow infrastructure to make the flutter branch ready for contributions.

Changes

  • New workflows and actions are added for checking Android and iOS builds.
  • All workflows triggered on a push event or release are removed for now.

Screenshots / Recordings

N/A

Checklist:

  • No hard coding: I have used resources from strings.xml, dimens.xml and colors.xml without hard coding any value.
  • No end of file edits: No modifications done at end of resource files strings.xml, dimens.xml or colors.xml.
  • Code reformatting: I have reformatted code and fixed indentation in every file included in this pull request.
  • No extra space: My code does not contain any extra lines or extra spaces than the ones that are necessary.

Summary by Sourcery

Configure CI workflows for the Flutter branch by adding new workflows for Android and iOS builds and removing existing workflows triggered on push events or releases.

CI:

  • Add new workflows for Android and iOS builds in the Flutter branch.
  • Remove workflows triggered on push events or releases.

Copy link

sourcery-ai bot commented Nov 3, 2024

Reviewer's Guide by Sourcery

This PR restructures the GitHub Actions workflows to support a Flutter application, introducing separate workflows for Android and iOS builds. The implementation splits the build process into three main components: a common workflow for shared tasks, and platform-specific workflows for Android and iOS. The common workflow handles Flutter setup, dependency management, code formatting, analysis, and testing, while platform-specific workflows manage their respective build processes.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Restructured the main pull request workflow to support Flutter builds
  • Replaced single build job with three separate jobs: common, Android, and iOS
  • Updated branch trigger to target 'flutter' branch only
  • Removed Java setup from main workflow as it's moved to Android-specific workflow
  • Added job dependencies to ensure common tasks run before platform-specific builds
.github/workflows/pull-request.yml
Created a common workflow action for shared Flutter tasks
  • Added Flutter environment setup with caching
  • Implemented dependency fetching with 'flutter pub get'
  • Added code formatting validation
  • Added static code analysis step
  • Included test execution step
.github/actions/common/action.yml
Implemented Android-specific build workflow
  • Set up Java 17 environment with Gradle caching
  • Configured Flutter environment for Android builds
  • Added support for APK and AAB generation
  • Implemented version name and code parameterization
  • Added keystore-related parameters for signing
.github/actions/android/action.yml
Implemented iOS-specific build workflow
  • Set up Flutter environment for iOS builds
  • Added IPA generation without code signing
  • Implemented version name and code parameterization
.github/actions/ios/action.yml
Removed unnecessary workflow files
  • Deleted push event workflow
  • Deleted release workflow
.github/workflows/push-event.yml
.github/workflows/release.yml

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.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a 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. You can also use
    this command to specify where the summary should be inserted.

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 @AsCress - I've reviewed your changes and found some issues that need to be addressed.

Blocking issues:

  • Add validation or warning for empty credential defaults (link)

Overall Comments:

  • Could you clarify the plan for handling releases? The removal of push-event.yml and release.yml workflows suggests these scenarios aren't covered yet.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🔴 Security: 1 blocking issue
  • 🟢 Testing: all looks good
  • 🟢 Complexity: 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.

.github/actions/android/action.yml Show resolved Hide resolved
.github/actions/android/action.yml Show resolved Hide resolved
@AsCress AsCress self-assigned this Nov 3, 2024
@AsCress AsCress added the Chore Changes to things that do not go into production label Nov 3, 2024
@AsCress
Copy link
Contributor Author

AsCress commented Nov 4, 2024

#2566 should be merged before this.

Copy link

github-actions bot commented Nov 8, 2024

@adityastic adityastic merged commit fce6a9e into fossasia:flutter Nov 8, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore Changes to things that do not go into production
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants