Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bundlewatch to track bundle size changes in PRs #2695

Merged
merged 1 commit into from Mar 17, 2021

Conversation

davwheat
Copy link
Member

Changes proposed in this pull request:
Add PR status to show the change in bundle size as a result of it. This CI workflow must run on master before it begins working.

It's also possible to define a max size for each of the JS files which will cause a failing status if the bundle is over that size, but I decided not to implement this.

For more configuration options, see: https://bundlewatch.io/#/reference/configuration

Example PR: https://github.com/davwheat/flarum-core/pull/8

Setup steps:

  1. Head here to get auth ID: https://service.bundlewatch.io/setup-github
  2. Create repo secret called BUNDLEWATCH_GITHUB_TOKEN with the token inside

Screenshot
image

Head here to get auth ID: https://service.bundlewatch.io/setup-github
Create repo secret called `BUNDLEWATCH_GITHUB_TOKEN` with the token inside
@davwheat davwheat self-assigned this Mar 15, 2021
@dsevillamartin
Copy link
Member

What if we merged this action with the JS build? That way we could have the action be called JavaScript / Bundlewatch (unsure if you can have different actions with the same main name 🤔)

@davwheat
Copy link
Member Author

@datitisev The main reason I opted not to is that we only run that workflow on pushes to master, and not for PRs and more. We don't want the bot committing dist JS onto PRs as that could create all sorts of merge conflicts.

@davwheat
Copy link
Member Author

@datitisev Any objections before I merge?

@davwheat davwheat merged commit 298f6c3 into master Mar 17, 2021
@davwheat davwheat deleted the dw/add-bundle-size-tracking-ci branch March 17, 2021 14:54
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.

None yet

4 participants