ci: Build Example Apps and adjust how workflows are triggered#389
Conversation
|
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. |
WalkthroughAdds 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
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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.ymlline 66 and.github/workflows/build-ios-examples.ymlline 57) invokeflutter builddirectly viamelos exec --package=...rather than calling these defined scripts (melos build:android:examples/melos build:ios:examples).Consider either:
- Using these melos scripts in the workflows for consistency and DRY
- 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-stablemay cause unexpected build failures when Apple releases new Xcode versions. Consider pinning to a specific version (e.g.,15.4or16) to ensure consistent builds..github/workflows/main.yml (1)
27-30: Upgradesubosito/flutter-actionto v2.
subosito/flutter-action@v1is outdated; v2 is the current major release with improved caching and active maintenance. Usesubosito/flutter-action@v2instead.
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 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.ymlpubspec.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-codesignflag 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: Missingpushtrigger for main/dev branches.Unlike the test workflow which triggers on both
pushandpull_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 - devIf 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: falseto 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-codesignflag 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.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 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.ymlpubspec.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-15runner, 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@v4andsubosito/flutter-action@v2bring the workflow to current versions, and enabling the cache will improve CI performance. The indentation fix forworking-directoryalso 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.ymlworkflow. This separation improves workflow clarity and maintainability.
Description
Replace this text.
Checklist
exampleor documentation.Breaking Change?
Related Issues