ci(actions): integration tests#430
Open
MarkOSullivan94 wants to merge 2 commits into
Open
Conversation
Collaborator
Author
|
Sample of the automated test summary comment (failure case) — for rendering verification, safe to delete. Caution At least one test failed. Please review the test results below. View Test Results
📂 clerk_authtest/unit/clerk_auth/persistor_test.dart
test/unit/utils/extensions_test.dart
|
|
Note All tests passed. View Test Results
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #392
What
Runs the
clerk_flutterintegration tests in CI on an iPhone simulator (they were previously skipped because they need a device to run on), and posts a summary of all test results as a PR comment.The workflow now has three jobs:
pr_check(ubuntu, unchanged apart from the reporting step) — formatting, analysis, unit and widget tests. Instead of rendering the test report itself, it now uploads its JSON test results as areports-unitartifact.integration_test(new,macos-latest) — bootstraps the workspace, boots the newest available iPhone simulator viaxcrun simctl, then runsmelos run test:integration -- -d <udid> --file-reporter=json:...and uploads the results as areports-integrationartifact.test_report(new) — fans in after both jobs, downloads all report artifacts into one directory, runsdorny/test-reporterso the PR still gets a single combined Test Report check, and posts a test summary comment on the PR.Test summary comment
.github/scripts/test_report_comment.dart(pure Dart, no dependencies) parses the JSON reports and generates the comment:[!CAUTION]callout when at least one test failed,[!NOTE]when everything passed.The comment is posted via
marocchino/sticky-pull-request-comment, so each push updates the existing comment in place rather than creating a new one. A workflow-levelconcurrencygroup cancels superseded in-flight runs on PR branches (runs onmainare never cancelled), so an older run can't finish late and overwrite the comment or check with stale results.Sample of the failure-case rendering: #430 (comment)
Notes
if: always()and the report/comment steps run on!cancelled(), so the combined report and comment are still produced when tests fail — which is when they matter most. If a job dies before producing any reports, its upload just warns and the report covers whatever the other job produced.--to the script command, so the-d/--file-reporterforwarding works without changes tomelos.yaml(verified locally).🤖 Generated with Claude Code