Make health checks runnable locally#390
Conversation
PR HealthLicense Headers ✔️
All source files should start with a license header. This check can be disabled by tagging the PR with API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with Breaking changes ✔️
This check can be disabled by tagging the PR with Unused Dependencies ✔️
For details on how to fix these, see dependency_validator. This check can be disabled by tagging the PR with Coverage ✔️
This check for test coverage is informational (issues shown here will not fail the PR). This check can be disabled by tagging the PR with Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with |
| if (hasTests) { | ||
| print(''' | ||
| Get coverage for ${package.name} by running coverage in ${package.directory.path}'''); | ||
| final coverageDir = |
There was a problem hiding this comment.
To avoid cluttering the users directory with folders - we didn't care about that when this only ran in CI
| FileStatus.added, Directory.current), | ||
| ) | ||
| .toList(); | ||
| githubApi = LocalGithubApi(prLabels: [], files: files); |
There was a problem hiding this comment.
In the future, we can add more configurability to this.
|
|
||
| const apiToolHash = '8654b768219d5707cdade72fdd80cf915e9d46b8'; | ||
| // ignore: constant_identifier_names | ||
| const dart_apitoolHash = '906fa0f3dca24d81d1c26ee71c884ecbb6234ecf'; |
There was a problem hiding this comment.
Updating after a small bug fix bmw-tech/dart_apitool#254
| explanation: versionMap['explanation'].toString(), | ||
| ); | ||
| } else { | ||
| log('Report was not created for $package at $reportPath'); |
There was a problem hiding this comment.
Just to make sure that errors are nicely surfaced.
|
|
||
| To run the health workflow locally, simply run | ||
| ``` | ||
| dart pub global activate --source git https://github.com/dart-lang/ecosystem --git-path pkgs/firehose/ |
There was a problem hiding this comment.
Hopefully soon this will be:
dart run 'firehose@{git: {url: https://github.com/dart-lang/ecosystem, path: pkgs/firehose}}'
There was a problem hiding this comment.
As long as there is a good help page shown when I have a typo (which I will have ;) )
sigurdm
left a comment
There was a problem hiding this comment.
LGMT
Would it make sense to publish this on pub, and recommend it as a dev-dependency?
|
We used to publish it, but stopped at some point because there was no use. We can start publishing again. |
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
Fixes #379, or at least tries to go there. Still plenty of room for improvement, but a good start.
TODOs for future PRs:
Contribution guidelines:
dart format.Many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.
Note: The Dart team is trialing Gemini Code Assist. Don't take its comments as final Dart team feedback. Use the suggestions if they're helpful; otherwise, wait for a human reviewer.