ci(audience): add pixel bundle size tracking GitHub Action#2835
Conversation
Adds a PR check that builds the pixel package and verifies the gzipped bundle stays under the 10KB budget. Posts a sticky PR comment with the current size and delta vs main, with warning at 8KB and failure at 10KB. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
View your CI Pipeline Execution ↗ for commit 656ad41
☁️ Nx Cloud last updated this comment at |
✅ Pixel Bundle Size — @imtbl/pixel
Budget: 10.00 KB gzipped (warn at 8.00 KB) |
fde9235 to
3f78122
Compare
…undle-size-action
nattb8
left a comment
There was a problem hiding this comment.
Is it possible to block the PR from merging too if it fails? But only affect PRs that touch audience/pixel or audience/core
Checking out by branch name rather than SHA means if someone pushes to the branch between the event firing and the checkout step, the workflow could build the wrong code. Pin to the exact commit SHA instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Not sure if we want to keep this? @nattb8 flagged an issue with my new action using .ref, so I fixed this action too.
3f23709 to
656ad41
Compare
@nattb8 yep, it already does this. It updates the comment so that it doesn't spam the PR on every commit so I took some screenshots. Over warning budget (check passes, warning message): Over threshold (fails check + error message): ( |
ceddf5d to
e0704da
Compare
e0704da to
656ad41
Compare




Summary
@imtbl/pixeland gates on a 10KB gzipped bundle budget (SDK-68)packages/audience/pixel/bundlebudget.jsonpackages/audience/pixel/**orpackages/audience/core/**Test plan
packages/audience/pixel/— verify workflow triggers, comment appears, check passes (~4KB is well under budget)maxSizeGzipto below current size — verify check fails with "Over budget" messagewarnSizeGzipto below current size — verify warning appears but check still passes🤖 Generated with Claude Code