Skip to content

ci(examples): run integration tests on all platforms for release PRs#1629

Merged
spydon merged 4 commits into
mainfrom
ci/example-integration-tests
Jul 23, 2026
Merged

ci(examples): run integration tests on all platforms for release PRs#1629
spydon merged 4 commits into
mainfrom
ci/example-integration-tests

Conversation

@spydon

@spydon spydon commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What

Adds a workflow that runs every example's integration_test/ suite across all Flutter targets whenever a release PR is opened.

  • Trigger: pull_request events, gated to titles starting with chore(release) (the title release-prepare.yml uses), so it only runs while a release is being prepared.
  • Targets: web, linux, macOS, windows, android, ios. The example apps only commit web/, so each job scaffolds its target on the fly with flutter create --platforms=<target> rather than committing platform folders.
  • Shared backend: only Linux runners can run the Docker-based local Supabase stack, so one backend job on ubuntu hosts it and exposes the API gateway through a cloudflared quick tunnel. The platform jobs run concurrently, pull the endpoint from a run artifact, run their tests against it, then drop a done-<id> marker; the backend waits for all markers before stopping Supabase.
  • The passkeys WebAuthn ceremony is already excluded from the tests (it can't run headless), so no runtime skips were added.

Notes

  • tasks_test.dart teardown is scoped to only the titles the run created (inFilter instead of like 'E2E %') so the shared instance is safe under concurrent runs. The passkeys test already uses a unique email per run.
  • cloudflared quick tunnels are best-effort; if they prove flaky we can move to Tailscale (needs TS_OAUTH_* secrets).
  • passkeys on android/ios may need a higher minSdkVersion / iOS deployment target than the flutter create defaults; if a native build fails that's the likely cause.

Summary by CodeRabbit

  • New Features
    • Added a new GitHub Actions workflow for “Example integration tests,” with concurrent run cancellation and conditional release-only execution.
    • Added a Dart-based test runner to validate environment variables, provision a temporary Supabase endpoint, and execute example integration tests.
    • Expanded coverage to run across Linux, web (headless Chrome), Android, macOS, iOS, and Windows.
  • Bug Fixes
    • Improved integration test teardown to delete only the specific Supabase tasks records created/renamed by the current test run.

@spydon
spydon requested a review from a team as a code owner July 21, 2026 13:16
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d3dcf438-97b7-4f2e-99c9-2271522a94d7

📥 Commits

Reviewing files that changed from the base of the PR and between 5a0c8ff and b22a3fb.

📒 Files selected for processing (1)
  • .github/scripts/run_example_integration_tests.dart
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/scripts/run_example_integration_tests.dart

📝 Walkthrough

Walkthrough

Adds GitHub Actions coverage for Supabase-backed Flutter example integration tests across six platforms, a Dart runner for platform-specific execution, and narrower CRUD test teardown cleanup.

Changes

Example integration CI

Layer / File(s) Summary
Provision Supabase test backend
.github/workflows/example-integration-tests.yml
Adds pull-request triggers, Supabase startup, Cloudflare tunneling, endpoint artifact publication, completion polling, and cleanup.
Run platform-specific example tests
.github/scripts/run_example_integration_tests.dart
Adds target validation, Supabase environment propagation, web driver handling, platform-specific Flutter commands, and process failure handling.
Orchestrate target test jobs
.github/workflows/example-integration-tests.yml
Adds the six-platform matrix, platform setup, endpoint consumption, example scaffolding, test invocation, and completion marker artifacts.
Isolate CRUD test cleanup
examples/database_crud/integration_test/tasks_test.dart
Limits teardown deletion to the titles created or renamed by the current test.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant Supabase
  participant CloudflareTunnel
  participant FlutterRunner
  participant GitHubArtifacts
  GitHubActions->>Supabase: start backend
  GitHubActions->>CloudflareTunnel: expose API endpoint
  GitHubActions->>GitHubArtifacts: upload endpoint.json
  FlutterRunner->>GitHubArtifacts: download endpoint.json
  FlutterRunner->>Supabase: run example integration tests
  FlutterRunner->>GitHubArtifacts: upload done-target marker
  GitHubActions->>GitHubArtifacts: poll completion markers
  GitHubActions->>Supabase: stop backend
Loading

Possibly related PRs

Suggested reviewers: tr00d

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the new CI workflow that runs example integration tests across platforms for release PRs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/example-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.

spydon added a commit that referenced this pull request Jul 22, 2026
## What

Adds a repo-level `.coderabbit.yaml` that disables CodeRabbit's failing
commit status:

```yaml
reviews:
  commit_status: true
  fail_commit_status: false
```

## Why

Open PRs are currently showing a red `CodeRabbit` check with the reason
**"Review rate limited"** (e.g. #1630, #1629, #1627), even though
nothing is actually wrong with the change. A completed review shows
`pass` (e.g. #1626).

- `commit_status: true` keeps the useful passing check for completed
reviews.
- `fail_commit_status: false` stops CodeRabbit from setting a `failure`
status when it can't review (which is what the rate-limit case
triggers).

Committing the config overrides CodeRabbit's cloud/org defaults.

## Note

If a rate-limited PR still goes red after this lands, the rate-limit
failure path ignores this flag and the only remaining lever is
`commit_status: false` (disables the check entirely, losing the green
pass too).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/scripts/run_example_integration_tests.dart:
- Around line 127-144: Update the child-process wait in _run to enforce a finite
timeout around process.exitCode. When the timeout expires, terminate the process
before reporting the failure and exiting, while preserving the existing
nonzero-exit handling and exit-code propagation for processes that finish
normally.
- Around line 33-41: Change the failure handling in _run to throw an error
instead of calling exit(exitCode), allowing the try/finally around the example
loop to execute chromedriver?.kill(). Capture the failure at the top-level run
flow after cleanup and exit once with the appropriate nonzero code.
- Around line 26-31: Update the chromedriver startup flow in the web branch to
wait until the Process returned by Process.start has successfully bound port
4444 before continuing to flutter drive. Use the existing chromedriver process
handle to implement a readiness wait, and preserve the current behavior for
non-web targets.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f1faa467-6d8b-4f36-a039-9c2b1aef9bd7

📥 Commits

Reviewing files that changed from the base of the PR and between 57334b4 and 5a0c8ff.

📒 Files selected for processing (2)
  • .github/scripts/run_example_integration_tests.dart
  • .github/workflows/example-integration-tests.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/example-integration-tests.yml

Comment thread .github/scripts/run_example_integration_tests.dart
Comment thread .github/scripts/run_example_integration_tests.dart
Comment thread .github/scripts/run_example_integration_tests.dart
Wait for chromedriver to bind port 4444 before running web tests, bound
the child process wait with a timeout, and clean up chromedriver on
failure by throwing instead of exiting inside _run.
@spydon
spydon merged commit 6979093 into main Jul 23, 2026
45 checks passed
@spydon
spydon deleted the ci/example-integration-tests branch July 23, 2026 11:47
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.

2 participants