Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Add bundle size github workflow #2005

Merged
merged 4 commits into from
Mar 21, 2020
Merged

Add bundle size github workflow #2005

merged 4 commits into from
Mar 21, 2020

Conversation

nerrad
Copy link
Contributor

@nerrad nerrad commented Mar 21, 2020

This workflow implements a bundle-size monitoring utility for our repository to give better metrics on increases in bundle-sizes. I basically copied the configuration for the WordPress gutenberg project workflow and it utilizes the preactjs/compressed-size-action.

This will replace our existing bundlewatch implementation.

Benefits of the switch:

  • We get inline feedback (as a comment) in the pull on any size changes.
  • This compares overall changes against the base branch for the pull (which we weren't getting with bundlewatch).
  • A list of all files and their changes is shown in a collapsed list in the posted comment. With bundlewatch, their linking system was broken, so if we wanted that granularity we had to go into the travis-ci job (which only showed us the sizes, not the difference from the base branch).
  • Removes the time for the bundlewatch checks from the linting travis job (not a huge difference but helps).

The only real downside to this switch is that we don't block merging pull with this. So there's no enforced size budgets. I'm not sure that's much of a downside though because our current pattern has been mostly to use this for awareness and we've generally bumped bundets to merge pulls (while having an issue for following up on size reviews).

So the big benefit here is getting actionable feedback on significant change (or improvements!!) on bundle sizes in context of the pull making those changes.

This workflow implements a bundle-size monitoring utility for our repository to give better metrics on increases in bundle-sizes. I basically copied the configuration for the WordPress gutenberg project workflow and it utilizes the [`preactjs/compressed-size-action`](https://github.com/preactjs/compressed-size-action).

If this works well, it will replace our existing bundlesize implementation.
@nerrad nerrad requested a review from a team as a code owner March 21, 2020 14:30
@nerrad nerrad requested review from Aljullu and removed request for a team March 21, 2020 14:30
@nerrad nerrad self-assigned this Mar 21, 2020
@nerrad nerrad added tools Used for work on build or release tools. skip-changelog PRs that you don't want to appear in the changelog. labels Mar 21, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Mar 21, 2020

Size Change: 0 B

Total Size: 2 MB

ℹ️ View Unchanged
Filename Size Change
build/active-filters-frontend.js 7.03 kB 0 B
build/active-filters.js 7.92 kB 0 B
build/all-products-frontend.js 16.7 kB 0 B
build/all-products.js 65.6 kB 0 B
build/all-reviews-legacy.js 10.3 kB 0 B
build/all-reviews.js 10.6 kB 0 B
build/attribute-filter-frontend.js 16.5 kB 0 B
build/attribute-filter.js 11.5 kB 0 B
build/block-error-boundary-legacy.js 775 B 0 B
build/block-error-boundary.js 773 B 0 B
build/blocks-legacy.js 2.71 kB 0 B
build/blocks.js 2.71 kB 0 B
build/cart-frontend.js 156 kB 0 B
build/cart.js 74 kB 0 B
build/checkbox-control-style-legacy.js 779 B 0 B
build/checkbox-control-style.js 781 B 0 B
build/checkout-frontend.js 159 kB 0 B
build/checkout.js 74.2 kB 0 B
build/custom-select-control-style-legacy.js 782 B 0 B
build/custom-select-control-style.js 783 B 0 B
build/editor-legacy-rtl.css 12.6 kB 0 B
build/editor-legacy.css 12.6 kB 0 B
build/editor-rtl.css 13.5 kB 0 B
build/editor.css 13.5 kB 0 B
build/featured-category-legacy.js 146 kB 0 B
build/featured-category.js 146 kB 0 B
build/featured-product-legacy.js 59.1 kB 0 B
build/featured-product.js 58.5 kB 0 B
build/handpicked-products-legacy.js 6.58 kB 0 B
build/handpicked-products.js 6.78 kB 0 B
build/panel-style-legacy.js 773 B 0 B
build/panel-style.js 774 B 0 B
build/price-filter-frontend.js 13.6 kB 0 B
build/price-filter.js 10 kB 0 B
build/product-best-sellers-legacy.js 6.68 kB 0 B
build/product-best-sellers.js 6.87 kB 0 B
build/product-categories-legacy.js 3.06 kB 0 B
build/product-categories.js 3.04 kB 0 B
build/product-category-legacy.js 7.59 kB 0 B
build/product-category.js 7.79 kB 0 B
build/product-new-legacy.js 6.84 kB 0 B
build/product-new.js 7.03 kB 0 B
build/product-on-sale-legacy.js 7.2 kB 0 B
build/product-on-sale.js 7.43 kB 0 B
build/product-search-legacy.js 3.4 kB 0 B
build/product-search.js 3.61 kB 0 B
build/product-tag-legacy.js 6.14 kB 0 B
build/product-tag.js 6.33 kB 0 B
build/product-top-rated-legacy.js 6.82 kB 0 B
build/product-top-rated.js 7 kB 0 B
build/products-by-attribute-legacy.js 7.75 kB 0 B
build/products-by-attribute.js 7.93 kB 0 B
build/reviews-by-category-legacy.js 12.3 kB 0 B
build/reviews-by-category.js 12.5 kB 0 B
build/reviews-by-product-legacy.js 13.7 kB 0 B
build/reviews-by-product.js 13.9 kB 0 B
build/reviews-frontend-legacy.js 8.21 kB 0 B
build/reviews-frontend.js 8.71 kB 0 B
build/snackbar-notice-style-legacy.js 779 B 0 B
build/snackbar-notice-style.js 778 B 0 B
build/spinner-style-legacy.js 775 B 0 B
build/spinner-style.js 771 B 0 B
build/style-legacy-rtl.css 3.68 kB 0 B
build/style-legacy.css 3.68 kB 0 B
build/style-rtl.css 13.6 kB 0 B
build/style.css 13.6 kB 0 B
build/vendors-legacy.js 280 kB 0 B
build/vendors-style-legacy-rtl.css 1.97 kB 0 B
build/vendors-style-legacy.css 1.97 kB 0 B
build/vendors-style-legacy.js 108 B 0 B
build/vendors-style-rtl.css 1.97 kB 0 B
build/vendors-style.css 1.97 kB 0 B
build/vendors-style.js 109 B 0 B
build/vendors.js 367 kB 0 B
build/wc-blocks-data.js 6.45 kB 0 B
build/wc-blocks-registry.js 1.53 kB 0 B
build/wc-settings.js 2.14 kB 0 B

compressed-size-action

- remove build:ci because it was only used for bundlesize check. No need to build files for linting checks.
- add lint:ci npm script for doing build lint checks
- update travis job config to use new script and update title
@nerrad nerrad merged commit 1823e62 into master Mar 21, 2020
@nerrad nerrad deleted the add/bundle-size-workflow branch March 21, 2020 16:10
@nerrad
Copy link
Contributor Author

nerrad commented Mar 21, 2020

This is a build tool only, so I'm going to go ahead and merge this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
skip-changelog PRs that you don't want to appear in the changelog. tools Used for work on build or release tools.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant