Skip to content

chore: Add melos commands for example app and e2e tests - #3945

Open
hkarmoush wants to merge 3 commits into
getsentry:mainfrom
hkarmoush:chore/melos-convenience-commands
Open

hkarmoush wants to merge 3 commits into
getsentry:mainfrom
hkarmoush:chore/melos-convenience-commands

Conversation

@hkarmoush

Copy link
Copy Markdown

📜 Description

Adds two melos scripts:

  • melos run example:flutter -- <platform> — builds and runs the Flutter example app (delegates to the existing packages/flutter/example/run.sh, so there's still one source of truth for the build logic).
  • melos run e2e:dart — runs the Dart e2e suite against sentry.io (mirrors .github/workflows/e2e_dart.yml, requires SENTRY_AUTH_TOKEN_E2E locally).

Also documents the existing and new scripts in a "Common commands" table in CONTRIBUTING.md, and fixes a small bug in run.sh where calling it with no arguments crashed on an unbound variable (set -u) instead of printing the usage message.

💡 Motivation and Context

Closes #3660

Building the example app and running the e2e suite both require remembering raw shell commands that live in a few different places (run.sh, CI workflow files). This wraps them behind melos run, which is discoverable via melos run --list.

I kept this scoped to the two examples the issue calls out rather than guessing at everything "and so on" might cover.

💚 How did you test it?

  • melos run example:flutter -- "" to confirm the script forwards args correctly and the run.sh usage guard fires as expected.
  • melos run e2e:dart to confirm it resolves dependencies and fails fast with a clear error when SENTRY_AUTH_TOKEN_E2E isn't set (same behavior as CI without the secret).
  • bash -n packages/flutter/example/run.sh to sanity check the shell syntax.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec
  • No breaking changes

🔮 Next steps

If there's appetite for it, a follow-up could tighten test:dart/test:flutter/analyze:* to match the flags CI actually uses (randomized test ordering, web/wasm runs, --fatal-infos), since those currently drift from what CI checks.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f7efadb. Configure here.

Comment thread melos.yaml
@hkarmoush
hkarmoush force-pushed the chore/melos-convenience-commands branch from f7efadb to f53be24 Compare August 8, 2026 14:38
Comment thread melos.yaml Outdated
@codecov

codecov Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.46%. Comparing base (130f1d1) to head (f53be24).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3945      +/-   ##
==========================================
+ Coverage   87.95%   92.46%   +4.51%     
==========================================
  Files         347      114     -233     
  Lines       12930     4391    -8539     
==========================================
- Hits        11372     4060    -7312     
+ Misses       1558      331    -1227     
Flag Coverage Δ
sentry ?
sentry_dio ?
sentry_drift ?
sentry_file ?
sentry_firebase_remote_config 100.00% <ø> (ø)
sentry_flutter 92.17% <ø> (ø)
sentry_grpc ?
sentry_hive ?
sentry_isar ?
sentry_link ?
sentry_logging ?
sentry_sqflite ?
sentry_supabase 97.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@hkarmoush
hkarmoush force-pushed the chore/melos-convenience-commands branch from 6d63ec5 to 997c7fa Compare August 31, 2026 08:00
Comment thread melos.yaml
@hkarmoush
hkarmoush force-pushed the chore/melos-convenience-commands branch from 997c7fa to 408f18e Compare September 7, 2026 10:55
Building the Flutter example and running the Dart e2e suite each
required remembering raw shell commands buried in scripts and CI
config. Wrap them as melos scripts so `melos run --list` surfaces
them, and document the common ones in CONTRIBUTING.md.

Also fixes a latent bug in run.sh where calling it with no arguments
crashed on an unbound variable instead of printing usage.
Melos runs scripts through cmd.exe on Windows, which can't execute
run.sh, so the windows platform arg was never reachable there.
buenaflor noted the Dart e2e test is slated for removal, so a melos
convenience wrapper for it isn't worth adding right now.
@hkarmoush
hkarmoush force-pushed the chore/melos-convenience-commands branch from 408f18e to 5bfb47a Compare September 18, 2026 13:41

This branch has not been deployed

No deployments
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 more convenient melos commands

2 participants