Skip to content

Add automatic builds on merged PRs#15

Merged
mariobehling merged 2 commits intofossasia:mainfrom
kienvo:ci-setup
Apr 10, 2025
Merged

Add automatic builds on merged PRs#15
mariobehling merged 2 commits intofossasia:mainfrom
kienvo:ci-setup

Conversation

@kienvo
Copy link
Copy Markdown
Member

@kienvo kienvo commented Apr 7, 2025

Resolves #2

Changes:

  • Automatic builds on PRs
  • Automatic builds and add output to apk branch on merged PRs

Summary by Sourcery

Set up continuous integration and automatic builds for the Magic Epaper app on both Android and iOS platforms

Enhancements:

  • Improve code formatting and consistency across multiple files
  • Update color conversion and image processing methods

Build:

  • Update pubspec.yaml to support broader SDK and Flutter versions
  • Add build configuration for Android and iOS platforms

CI:

  • Add GitHub Actions workflows for push and pull request events
  • Implement automated builds for Android and iOS platforms
  • Configure version increment and artifact upload workflows

Chores:

  • Refactor and clean up existing code formatting
  • Remove trailing newlines in various files

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 7, 2025

Reviewer's Guide by Sourcery

This pull request introduces automated builds and CI/CD pipelines for Android and iOS platforms using GitHub Actions. It includes workflows for pull request builds, separate workflows for Android, iOS, and common build checks, and steps for code formatting, linting, and testing. Additionally, it updates the pubspec.yaml file to specify Flutter and Dart SDK versions, and refactors code formatting across multiple files.

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

File-Level Changes

Change Details Files
Configured GitHub Actions for automated builds and CI/CD for Android and iOS platforms.
  • Added workflows for pull request builds.
  • Implemented separate workflows for Android, iOS, and common build checks.
  • Added code formatting, linting, and testing steps in CI pipeline.
  • Added common workflow to run Flutter tests.
  • Added code analysis and formatting checks.
.github/workflows/push.yml
.github/workflows/pull_request.yml
.github/actions/android/action.yml
.github/actions/ios/action.yml
.github/actions/common/action.yml
Updated project configuration and dependencies.
  • Updated pubspec.yaml to specify Flutter and Dart SDK versions.
pubspec.yaml
Implemented automatic build and upload of APK/AAB files to a dedicated 'apk' branch.
  • The workflow now automatically clones the 'apk' branch, copies the generated APK/AAB files, and pushes the updated files back to the 'apk' branch.
  • The workflow removes previous files from the branch before copying the new build files.
  • The workflow renames the new build files to include the branch name.
  • The workflow force pushes the changes to the 'apk' branch.
.github/workflows/push.yml
Implemented automatic upload of the app to the Google Play Store's open testing track.
  • The workflow now automatically uploads the app to the open testing track using Fastlane.
  • The workflow clones the fastlane-android branch.
  • The workflow executes the uploadToOpenTesting lane.
.github/workflows/push.yml
Implemented automatic upload of the app to TestFlight.
  • The workflow now automatically uploads the app to TestFlight using Fastlane.
  • The workflow clones the fastlane-ios branch.
  • The workflow executes the uploadToBeta lane.
.github/workflows/push.yml
Refactored code formatting across multiple files.
  • Improved code style consistency.
lib/view/widget/image_list.dart
lib/util/image_processing/extract_quantizer.dart
lib/util/protocol.dart
lib/main.dart
lib/util/epd/edp.dart
lib/view/image_editor.dart
lib/view/home_screen.dart
lib/util/epd/gdey037z03.dart
lib/util/epd/gdey037z03bw.dart
lib/provider/image_loader.dart
lib/util/image_processing/remap_quantizer.dart
lib/util/epd/driver/driver.dart
lib/util/image_processing/image_processing.dart
lib/util/magic_epaper_firmware.dart
lib/util/st25dv.dart
Replaced print statements with debugPrint.
  • Replaced print statements with debugPrint.
lib/util/protocol.dart

Assessment against linked issues

Issue Objective Addressed Explanation

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!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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

@kienvo kienvo marked this pull request as ready for review April 10, 2025 04:10
Copy link
Copy Markdown
Contributor

@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 @kienvo - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider using environment variables for configuration instead of hardcoding values.
  • The commit history will be cleaner if you squash commits before merging.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 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.

@kienvo
Copy link
Copy Markdown
Member Author

kienvo commented Apr 10, 2025

Still need to test signing and pushing app in open testing track. I have no idea how it going, @mariobehling @adityastic please continue this work.

Edit: And also the iOS build.

Copy link
Copy Markdown
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

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

Merging this as work partly done. Thank you

@mariobehling mariobehling merged commit a7d16f2 into fossasia:main Apr 10, 2025
2 of 3 checks passed
@mariobehling
Copy link
Copy Markdown
Member

@kienvo Please follow up on this. This is only partly done. The automatic builds do not work yet.

github-actions Bot added a commit that referenced this pull request Jun 13, 2025
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.

Add automatic app builds on merged PRs into the app branch

2 participants