ci: Gate every push and PR on tests and the maximum pub.dev score - #10
Merged
Conversation
Add a GitHub Actions workflow with two jobs: - test: dart format --set-exit-if-changed, dart analyze --fatal-infos, dart test --exclude-tags live, and a check that the committed json_serializable output matches a fresh build_runner run - score: run pana with --json, write the per-section breakdown to the job summary, upload the report as an artifact, and fail unless grantedPoints equals maxPoints Add the CI badge to the README and document the gate in CLAUDE.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reference actions/checkout, dart-lang/setup-dart and actions/upload-artifact by full commit SHA (tag noted in a comment) so a moved upstream tag cannot change what the workflow executes, and set `permissions: contents: read` since neither job writes to the repo. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Makes the pub.dev score a hard gate instead of a one-off local run. Every push to
masterand every PR now runs:dart format --set-exit-if-changed,dart analyze --fatal-infos,dart test --exclude-tags live, and a check thatlib/src/models/*.g.dartmatch a freshdart run build_runner build.pana --json, per-section breakdown in the job summary,pana.jsonuploaded as an artifact, and the job fails unlessgrantedPoints == maxPoints.panais the same tool pub.dev runs on published packages, so a greenscorejob onmasteris the score the listing will show afterdart pub publish.Verification
Local run of exactly what the workflow executes, on
master@a2b9684:The first real run is this PR's own checks.
🤖 Generated with Claude Code
Greptile Summary
The PR adds CI gates for formatting, analysis, tests, generated-code consistency, and the maximum pub.dev score, with supporting documentation and a README badge.
master.panareport as a workflow artifact.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "ci: Pin actions to commit SHAs and drop ..." | Re-trigger Greptile