Enforce bundle size in PRs with the Tuist GitHub App

Tuist can already track your app’s bundle size over time and post PR comments showing how it changed. But until now, there was no way to enforce a limit, and so a size regression could slip through if no one caught the comment.

You can now configure bundle size thresholds that automatically fail a PR’s checks when your app’s install or download size grows beyond a percentage you define. The check includes a breakdown of the baseline vs. current size and the exact deviation, so there’s no guessing about what changed.

And if the increase is intentional, say you added a new feature that justifiably adds weight, you can accept it directly from the GitHub check run with one click. No need to disable the threshold, merge with a failing check, or ping someone to approve.

How it works

  1. Connect your project to the Tuist GitHub app
  2. Go to your project’s Bundles settings and add a threshold. Pick a metric (install size or download size), a baseline branch, and a maximum deviation percentage
  3. Run tuist inspect bundle in CI as you already do
  4. Tuist creates a GitHub Check Run on the PR. If the threshold is exceeded, the check fails with an Accept button to approve the increase

Learn more

Full documentation: Bundle size thresholds

As always, feedback is very much welcome :relieved_face: