Skip to content

ci: Gate every push and PR on tests and the maximum pub.dev score - #10

Merged
srthkpthk merged 2 commits into
masterfrom
ci/pana-score-gate
Aug 28, 2026
Merged

ci: Gate every push and PR on tests and the maximum pub.dev score#10
srthkpthk merged 2 commits into
masterfrom
ci/pana-score-gate

Conversation

@srthkpthk

@srthkpthk srthkpthk commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

Makes the pub.dev score a hard gate instead of a one-off local run. Every push to master and every PR now runs:

  • testdart format --set-exit-if-changed, dart analyze --fatal-infos, dart test --exclude-tags live, and a check that lib/src/models/*.g.dart match a fresh dart run build_runner build.
  • scorepana --json, per-section breakdown in the job summary, pana.json uploaded as an artifact, and the job fails unless grantedPoints == maxPoints.

pana is the same tool pub.dev runs on published packages, so a green score job on master is the score the listing will show after dart pub publish.

Verification

Local run of exactly what the workflow executes, on master @ a2b9684:

$ dart run build_runner build && dart format lib/src/models && git diff --exit-code -- lib/src/models
Built with build_runner/aot in 14s; wrote 20 outputs.
Formatted 27 files (0 changed)
diff exit=0

$ dart pub global run pana --json --no-warning . | jq '{granted: .scores.grantedPoints, max: .scores.maxPoints}'
{"granted":160,"max":160}

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.

  • Runs validation on pull requests and pushes to master.
  • Uploads the generated pana report as a workflow artifact.
  • Pins external GitHub Actions to immutable commit SHAs and restricts workflow permissions to read-only repository contents.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Adds the test and pub.dev score jobs; the previously reported mutable Action references are now pinned to full commit SHAs.
CLAUDE.md Documents the new CI checks and the local command for reproducing the pub.dev score.
README.md Adds a badge linking to the new CI workflow.

Reviews (2): Last reviewed commit: "ci: Pin actions to commit SHAs and drop ..." | Re-trigger Greptile

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>
Comment thread .github/workflows/ci.yml Outdated
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>
@srthkpthk
srthkpthk merged commit 0325e12 into master Aug 28, 2026
4 checks passed
@srthkpthk
srthkpthk deleted the ci/pana-score-gate branch August 28, 2026 09:21
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.

1 participant