-
-
Notifications
You must be signed in to change notification settings - Fork 315
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 CI workflow to compute diff between files dist files #2269
Conversation
It looks like there are permissions issues, even after added Even if I use I suspect a configuration at organization-level...? @kbond do you think you can do something about that please? 🙏🏻 /cc @nicolas-grekas or maybe you Nicolas since you setup the same action on Symfony recipes repositories :) Thanks! |
e6face5
to
4274e69
Compare
Shouldn't this job only run if a dist file has been changed? |
Fixed by using the following config: on:
pull_request:
paths:
- 'src/*/assets/dist/**'
- 'src/*/src/Bridge/*/assets/dist/**'
I will push soon, thanks |
1e3e78c
to
92bdb59
Compare
6d65eb3
to
6acb472
Compare
I've changed the table rendering after @javiereguiluz's comment, it now looks like this: We still need to find out why there is this |
@Kocal I like a lot what you are doing here. Thanks. Some additional comments ... but I could be wrong, so feel free to ignore them:
Thanks! |
Thanks Javier, the more we speak about Brotli and the more I think we can remove it (btw pkg-size-action can display Brotli sizes). Gzip is the most common compression standard for the moment, while Brotli is — I believe — still a "niche" thing. Brotli users know that their files will be smaller than gzipped files. I agree for percentage rounding. When it comes to putting percentages first, I don't really agree with you. Yes, percentage differences are important, but when the browser goes to download a resource, it's the size of the resource that matters, not the percentage difference. |
Looks very nice!! Thanks a lot Hugo. |
This looks great!
|
@kbond yes there are still permission issues, and I can revert the temporary commit (when permissions will be fixed, otherwise we won't see the comment) |
b66b79c
to
ca30dc5
Compare
I've reworked the workflow in two dedicated workflows, hoping for permissions issues to be gone. I reverted the commit that modify dist files for testing purposes. I'm merging ASAP |
8d34f73
to
0558c79
Compare
🚨 Before merging, we should drop the commit that modify files (in order to generate the diff table)
This PR is purely internal, and aims to display the
assets/dist/*.{js,css}
files diff between2.x
and a pull-request. Similar to https://github.com/marketplace/actions/pkg-size-action, but fully internal.I wanted a tool that display dist files size diff for each pull-request, because I was a bit afraid of changes done in #2160.
When a PR is opened, it check dist files between the base branch (
2.x
) and the pull request, and it create a GitHub comment. The comment is created by https://github.com/marocchino/sticky-pull-request-comment, and is automatically updated depending of the check state.If any diff between dist files, then a table is displayed, with a line per file. It shows the original size and compressed (gzip and brotli) sizes, and also a difference in %.
States
Currently not working on this repository, but you can see them on Kocal#1
When opening a PRWhen an issue happened
When there is no difference between base and PR
When there is difference between base and PR