Before publishing, send a canary out to test a package against a suite of applications. This helps identify potential breaking changes introduced by package updates, ensuring seamless integration across the ecosystem.
It checks if your package upgrade would result in failures in the ecosystem. This is achieved by running the following pseudocode:
for (final app in applicationSuite) { if (app.dependencies.contains(package)) { pubGet(app); analyze(app); test(app); upgradePackage(app); pubGet(app); analyze(app); test(app); } }
.github/test_repos/repos.json. Follow the schema specified here.{ "https://github.com/mosuem/my_app_old_web": { "level": "analyze" }, "https://github.com/mosuem/my_app_new_web": { "level": "test", "packages": { "exclude": "intl4x" } } }
canary.yaml with the following contents:name: Canary on: pull_request: branches: [ main ] types: [opened, synchronize, reopened, labeled, unlabeled] jobs: test_ecosystem: uses: dart-lang/ecosystem/.github/workflows/canary.yaml@main with: repos_file: .github/test_repos/repos.json
post_summaries.yamlname: Comment on the pull request on: # Trigger this workflow after the Health workflow completes. This workflow will have permissions to # do things like create comments on the PR, even if the original workflow couldn't. workflow_run: workflows: - Canary types: - completed jobs: upload: uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main permissions: pull-requests: write
Contributions are welcome! Please see the contribution guidelines.