Skip to content

ci: Build Example Apps and adjust how workflows are triggered#389

Merged
ABausG merged 10 commits into
mainfrom
ci/build-example-apps
Jan 3, 2026
Merged

ci: Build Example Apps and adjust how workflows are triggered#389
ABausG merged 10 commits into
mainfrom
ci/build-example-apps

Conversation

@ABausG
Copy link
Copy Markdown
Owner

@ABausG ABausG commented Jan 2, 2026

Description

Replace this text.

Checklist

  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added code (documentation) comments where necessary.
  • I have updated/added relevant examples in example or documentation.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

@docs-page
Copy link
Copy Markdown

docs-page Bot commented Jan 2, 2026

To view this pull requests documentation preview, visit the following URL:

docs.page/abausg/home_widget~389

Documentation is deployed and generated using docs.page.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 2, 2026

Walkthrough

Adds four new CI workflows (Android integration, Android example builds, iOS example builds, package tests), removes the Flutter Beta workflow, simplifies the main workflow, adds Melos build scripts for examples in pubspec.yaml, and adds "codesign" to the cspell dictionary.

Changes

Cohort / File(s) Summary
CI: New workflows
.github/workflows/android-integration.yml, .github/workflows/build-android-examples.yml, .github/workflows/build-ios-examples.yml, .github/workflows/test.yml
Adds workflows for Android integration tests, matrix-driven Android example builds, matrix-driven iOS example builds (macOS, --no-codesign), and package tests with coverage. All use Flutter stable with caching and Melos where applicable.
CI: Main workflow edits
.github/workflows/main.yml
Updates action versions (checkout v2→v4, flutter-action v1→v2 with cache), reorders Analyze/Format, and removes prior test/coverage/android-integration steps.
CI: Removed workflow
.github/workflows/flutter-beta.yml
Removes the Flutter Beta workflow and all its jobs and steps.
Build scripts
pubspec.yaml
Adds Melos scripts: build:android:examples and build:ios:examples to run release builds for example packages.
Spellcheck
.github/cspell.yaml
Adds the word codesign to the cspell words dictionary.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant GH as GitHub Actions
participant Runner as CI Runner (ubuntu / macOS)
participant Checkout as actions/checkout
participant Flutter as Flutter SDK
participant Melos as Melos
participant Platform as Android Emulator / Xcode
Note over GH,Runner: workflow_dispatch / pull_request triggers
GH->>Runner: allocate runner
Runner->>Checkout: checkout repository
Runner->>Flutter: setup Flutter (stable, cache)
Runner->>Melos: run melos (discover examples / run scripts)
alt Build example (matrix job)
Runner->>Runner: prepare env (JDK 21, free disk)
Runner->>Flutter: flutter build (apk / ipa --no-codesign)
Runner->>GH: report status / artifacts
else Android integration test
Runner->>Platform: start Android emulator (API 33)
Runner->>Flutter: run integration_test (android)
Platform-->>Runner: test results
Runner->>GH: report status / artifacts
end

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is largely incomplete. It contains only the template placeholder 'Replace this text.' with no substantive explanation of the changes, motivations, or impact of the PR. Provide a detailed description of the changes made, explain the motivation for each workflow modification, and clarify why the flutter-beta workflow was removed.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: building example apps and adjusting workflow triggers. It is concise, uses the correct 'ci:' conventional commit prefix, and accurately reflects the primary objectives of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de5d298 and 06f566a.

📒 Files selected for processing (1)
  • .github/workflows/test.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Build iOS Examples (lockscreen_widgets)
  • GitHub Check: Build iOS Examples (configurable_widget)
  • GitHub Check: Build iOS Examples (home_widget_example)
  • GitHub Check: Build Android Examples (home_widget_example)
  • GitHub Check: iOS Integration Tests
  • GitHub Check: Android Integration Tests
  • GitHub Check: iOS Integration Tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (66bffb1) to head (06f566a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #389   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          115       115           
=========================================
  Hits           115       115           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
pubspec.yaml (1)

43-48: Melos scripts are defined but not used by the workflows.

The workflows (.github/workflows/build-android-examples.yml line 66 and .github/workflows/build-ios-examples.yml line 57) invoke flutter build directly via melos exec --package=... rather than calling these defined scripts (melos build:android:examples / melos build:ios:examples).

Consider either:

  1. Using these melos scripts in the workflows for consistency and DRY
  2. Removing these scripts if per-package matrix builds are the intended pattern

The current approach duplicates the build commands.

.github/workflows/build-ios-examples.yml (1)

48-50: Consider pinning Xcode version for build reproducibility.

Using xcode-version: latest-stable may cause unexpected build failures when Apple releases new Xcode versions. Consider pinning to a specific version (e.g., 15.4 or 16) to ensure consistent builds.

.github/workflows/main.yml (1)

27-30: Upgrade subosito/flutter-action to v2.

subosito/flutter-action@v1 is outdated; v2 is the current major release with improved caching and active maintenance. Use subosito/flutter-action@v2 instead.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 66bffb1 and f58cf1f.

📒 Files selected for processing (7)
  • .github/cspell.yaml
  • .github/workflows/android-integration.yml
  • .github/workflows/build-android-examples.yml
  • .github/workflows/build-ios-examples.yml
  • .github/workflows/main.yml
  • .github/workflows/test.yml
  • pubspec.yaml
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/test.yml

46-46: the runner of "codecov/codecov-action@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Build Android Examples (home_widget_example)
  • GitHub Check: Build iOS Examples (lockscreen_widgets)
  • GitHub Check: Build iOS Examples (home_widget_example)
  • GitHub Check: Build iOS Examples (configurable_widget)
  • GitHub Check: Tests
  • GitHub Check: Quality Checks
  • GitHub Check: iOS Integration Tests
  • GitHub Check: Android Integration Tests
  • GitHub Check: iOS Integration Tests
🔇 Additional comments (9)
.github/cspell.yaml (1)

79-79: LGTM!

The addition of "codesign" to the dictionary is appropriate, aligning with the --no-codesign flag used in the new iOS example build workflow.

.github/workflows/main.yml (1)

34-39: LGTM!

The quality checks workflow is well-structured with analyze, format, and publishability steps. The Flutter caching addition will improve CI performance.

.github/workflows/build-android-examples.yml (3)

3-14: Missing push trigger for main/dev branches.

Unlike the test workflow which triggers on both push and pull_request, this workflow only triggers on PRs and manual dispatch. If example builds should also run on pushes to main/dev (e.g., to catch issues from direct commits or merges), consider adding:

push:
  branches:
    - main
    - dev

If this is intentional to reduce CI load, this comment can be disregarded.


35-37: LGTM on matrix discovery logic.

The jq pipeline correctly extracts package names from melos JSON output and formats them as a JSON array for the matrix. The --ignore="home_widget" filter ensures only example packages are built.


52-66: LGTM!

The build job is well-configured with disk cleanup, JDK 21 setup, and fail-fast: false to ensure all matrix entries complete regardless of individual failures.

.github/workflows/android-integration.yml (2)

37-41: LGTM on KVM enablement.

The udev rules configuration correctly enables KVM access for the GitHub Actions runner, which is required for hardware-accelerated Android emulation.


47-57: LGTM!

The emulator configuration is well-suited for CI: headless mode (-no-window), software rendering (swiftshader_indirect), and disabled audio/camera reduce resource usage. The 15-minute boot timeout accommodates potential CI slowness.

.github/workflows/build-ios-examples.yml (1)

20-57: LGTM on workflow structure.

Running discovery on ubuntu-latest (cheaper) and builds on macos-15 (required for iOS) is a cost-effective approach. The --no-codesign flag correctly bypasses code signing for CI environments without Apple Developer credentials.

.github/workflows/test.yml (1)

37-44: LGTM!

The golden failure archiving with conditional if: failure() and 2-day retention is a good debugging aid that won't clutter artifact storage.

Comment thread .github/workflows/test.yml Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f58cf1f and f8ac8fa.

📒 Files selected for processing (7)
  • .github/workflows/android-integration.yml
  • .github/workflows/build-android-examples.yml
  • .github/workflows/build-ios-examples.yml
  • .github/workflows/flutter-beta.yml
  • .github/workflows/main.yml
  • .github/workflows/test.yml
  • pubspec.yaml
💤 Files with no reviewable changes (1)
  • .github/workflows/flutter-beta.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/build-ios-examples.yml
🚧 Files skipped from review as they are similar to previous changes (3)
  • pubspec.yaml
  • .github/workflows/android-integration.yml
  • .github/workflows/build-android-examples.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Build iOS Examples (home_widget_example)
  • GitHub Check: Build iOS Examples (lockscreen_widgets)
  • GitHub Check: Build iOS Examples (configurable_widget)
  • GitHub Check: Build Android Examples (home_widget_example)
  • GitHub Check: iOS Integration Tests
  • GitHub Check: Tests
  • GitHub Check: Quality Checks
  • GitHub Check: Android Integration Tests
  • GitHub Check: iOS Integration Tests
🔇 Additional comments (5)
.github/workflows/test.yml (3)

1-19: LGTM: Workflow configuration is well-structured.

The trigger conditions, path filters, and concurrency configuration are appropriate for a dedicated test workflow. Path filters ensure the workflow only runs when relevant package files or the workflow itself changes.


21-34: LGTM: Job setup follows best practices.

The use of macos-15 runner, current action versions, and Flutter caching are appropriate choices. The working directory is correctly scoped at the job level.


35-44: LGTM: Test execution and failure handling are well-configured.

The golden failure archival on test failure is a helpful debugging feature, and the 2-day retention period is reasonable for investigation.

.github/workflows/main.yml (2)

23-31: LGTM: Action updates and cache enablement improve the workflow.

The updates to actions/checkout@v4 and subosito/flutter-action@v2 bring the workflow to current versions, and enabling the cache will improve CI performance. The indentation fix for working-directory also improves consistency.


32-39: LGTM: Workflow simplification aligns with single-responsibility principle.

The refactored workflow now focuses exclusively on quality checks (formatting, analysis, and publishability), while test execution has been moved to the dedicated test.yml workflow. This separation improves workflow clarity and maintainability.

Comment thread .github/workflows/test.yml Outdated
@ABausG ABausG merged commit c3eaf13 into main Jan 3, 2026
15 checks passed
@ABausG ABausG deleted the ci/build-example-apps branch January 3, 2026 15:28
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