cli
cli copied to clipboard
ci: fix build-head size failure for forks
🔗 Linked issue
Not a related issue but this state of Dan about the failure of the build-head from size for forks https://github.com/nuxt/cli/pull/702#issuecomment-2614130360
❓ Type of change
- [ ] 📖 Documentation (updates to the documentation or readme)
- [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
- [ ] 👌 Enhancement (improving an existing functionality)
- [ ] ✨ New feature (a non-breaking change that adds functionality)
- [x] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
- [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
📚 Description
Adding repository: ${{ github.event.pull_request.head.repo.full_name }} to comparate build size for forked branchs too
From https://github.com/actions/checkout/issues/551
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Please upload report for BASE (
main@e59a0da). Learn more about missing BASE report.
Additional details and impacted files
@@ Coverage Diff @@
## main #705 +/- ##
=======================================
Coverage ? 13.36%
=======================================
Files ? 68
Lines ? 3420
Branches ? 98
=======================================
Hits ? 457
Misses ? 2932
Partials ? 31
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
npm i https://pkg.pr.new/create-nuxt@705
npm i https://pkg.pr.new/nuxi@705
npm i https://pkg.pr.new/@nuxt/cli@705
commit: 46554b4
oops. too hasty an approval.
still, thank you for looking at this
THanks @danielroe , i am tring to see why the compare is failing, looks like it is relative to permisison/fork too, i am investigating that
@danielroe i've tried one hour long all the things to find out why it was not working... even tho i was wondering if it is related to the fork, i saw some olders PR (weeks not that much) that the check passed. Please fill free to close this one and create a branch with cherry-pick/copying the code to check if it all pass. SOrry about that, thanks to look it up
thank you! if you're happy to leave this PR open, I can experiment a bit with it
@danielroe for sure, feel free to play around with it
I did some testing and looks like when changing from pull_request to pull_request_target works, but the pull_request_target must be on the main yml.
At my test it does look like related to the fork, but quite doesnot make sense to me, once other prs with fork have passed on the past
@danielroe sorry i wrote it wrong, by:
but the pull_request_target must be on the main yml.
i mean on the yml of the main branch here https://github.com/nuxt/cli/blob/main/.github/workflows/size.yml at my tests, adding it on the branch/pr yml did not make any effect :/
weirdly, this still seems to be failing.
@danielroe i believe is due the repository: ${{ github.event.pull_request.head.repo.full_name }} line missing isnot?
Brought back the repo info but continue to failing, nowi am changing to use sha as twk3 said in here https://github.com/twk3/rollup-size-compare-action/issues/273#issuecomment-2622042557
Looks like that: for pull_request_target, it needs:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
for pull_request it needs the ref to be
ref: ${{github.event.pull_request.head.sha}}
Bundle Stats — create-nuxt-app size comparison
Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.
As this PR is updated, I'll keep you updated on how the bundle size is impacted.
Total
| Files count | Total bundle size | % Changed |
|---|---|---|
| 5 | 977.22 kB | 0% |
Changeset
No files were changed
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
| Asset | File Size | % Changed |
|---|---|---|
| index.mjs | 1.03 kB | 0% |
| chunks/multipart-parser.mjs | 5.11 kB | 0% |
| chunks/prompt.mjs | 42.92 kB | 0% |
| chunks/satisfies.mjs | 43.66 kB | 0% |
| shared/create-nuxt-app.COz3HthK.mjs | 884.5 kB | 0% |
Bundle Stats — nuxi size comparison
Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.
As this PR is updated, I'll keep you updated on how the bundle size is impacted.
Total
| Files count | Total bundle size | % Changed |
|---|---|---|
| 52 | 5.66 MB | 0% |
Changeset
No files were changed
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
| Asset | File Size | % Changed |
|---|---|---|
| index.mjs | 188 B | 0% |
| chunks/prompt.mjs | 42.92 kB | 0% |
| chunks/add.mjs | 6.83 kB | 0% |
| chunks/analyze.mjs | 3.18 kB | 0% |
| chunks/build.mjs | 1.97 kB | 0% |
| chunks/cleanup.mjs | 471 B | 0% |
| chunks/dev-child.mjs | 1.94 kB | 0% |
| chunks/dev.mjs | 9.83 kB | 0% |
| chunks/devtools.mjs | 764 B | 0% |
| chunks/generate.mjs | 388 B | 0% |
| chunks/info.mjs | 4.39 kB | 0% |
| chunks/init.mjs | 796.75 kB | 0% |
| chunks/index.mjs | 274 B | 0% |
| chunks/prepare.mjs | 984 B | 0% |
| chunks/preview.mjs | 2.84 kB | 0% |
| chunks/test.mjs | 1.16 kB | 0% |
| chunks/typecheck.mjs | 1.74 kB | 0% |
| chunks/upgrade.mjs | 6.28 kB | 0% |
| chunks/satisfies.mjs | 116 B | 0% |
| chunks/main.mjs | 15.34 kB | 0% |
| chunks/index2.mjs | 928.05 kB | 0% |
| chunks/dev2.mjs | 69.63 kB | 0% |
| chunks/index3.mjs | 17.14 kB | 0% |
| chunks/xdg-open.mjs | 25.32 kB | 0% |
| chunks/node.mjs | 134.29 kB | 0% |
| chunks/index4.mjs | 1.24 kB | 0% |
| chunks/index5.mjs | 71.77 kB | 0% |
| chunks/multipart-parser.mjs | 5.11 kB | 0% |
| chunks/add2.mjs | 12.02 kB | 0% |
| chunks/search.mjs | 45.83 kB | 0% |
| chunks/index6.mjs | 5.87 kB | 0% |
| chunks/index7.mjs | 886.12 kB | 0% |
| chunks/multipart-parser2.mjs | 4.58 kB | 0% |
| shared/nuxi.CNOaPyMI.mjs | 76.09 kB | 0% |
| shared/nuxi.CQCOwqp7.mjs | 804 B | 0% |
| shared/nuxi.OOMyZ32S.mjs | 294 B | 0% |
| shared/nuxi.DdI-vRyV.mjs | 1.54 kB | 0% |
| shared/nuxi.DA2iyhWl.mjs | 17.68 kB | 0% |
| shared/nuxi.BSm0_9Hr.mjs | 107 B | 0% |
| shared/nuxi.DdhC99SO.mjs | 836 B | 0% |
| shared/nuxi.CuJTCwFq.mjs | 1.34 kB | 0% |
| shared/nuxi.CJma5jOe.mjs | 14.64 kB | 0% |
| shared/nuxi.DJS4sf9f.mjs | 6.13 kB | 0% |
| shared/nuxi.CgvJibj-.mjs | 9.65 kB | 0% |
| shared/nuxi.DjaK5DQQ.mjs | 2.02 MB | 0% |
| shared/nuxi.E-ZsRS8r.mjs | 943 B | 0% |
| shared/nuxi.BgENdoyd.mjs | 1.76 kB | 0% |
| shared/nuxi.D-jL-mQ9.mjs | 151.93 kB | 0% |
| shared/nuxi.BhrojoaM.mjs | 285.05 kB | 0% |
| shared/nuxi.ChFrgAY-.mjs | 5.71 kB | 0% |
| shared/nuxi.Do0aYBCO.mjs | 5.46 kB | 0% |
| shared/nuxi.Dka9C7kP.mjs | 43.55 kB | 0% |
Bundle Stats — nuxt-cli size comparison
Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.
As this PR is updated, I'll keep you updated on how the bundle size is impacted.
Total
| Files count | Total bundle size | % Changed |
|---|---|---|
| 29 | 78.85 kB | 0% |
Changeset
No files were changed
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
| Asset | File Size | % Changed |
|---|---|---|
| index.mjs | 200 B | 0% |
| chunks/add.mjs | 6.83 kB | 0% |
| chunks/analyze.mjs | 3.18 kB | 0% |
| chunks/build.mjs | 1.97 kB | 0% |
| chunks/cleanup.mjs | 471 B | 0% |
| chunks/dev-child.mjs | 1.95 kB | 0% |
| chunks/dev.mjs | 7.21 kB | 0% |
| chunks/devtools.mjs | 763 B | 0% |
| chunks/generate.mjs | 388 B | 0% |
| chunks/info.mjs | 4.39 kB | 0% |
| chunks/init.mjs | 5.21 kB | 0% |
| chunks/index.mjs | 274 B | 0% |
| chunks/prepare.mjs | 984 B | 0% |
| chunks/preview.mjs | 2.84 kB | 0% |
| chunks/test.mjs | 1.16 kB | 0% |
| chunks/typecheck.mjs | 1.74 kB | 0% |
| chunks/upgrade.mjs | 6.28 kB | 0% |
| chunks/dev2.mjs | 7.8 kB | 0% |
| chunks/add2.mjs | 11.83 kB | 0% |
| chunks/search.mjs | 2.94 kB | 0% |
| shared/cli.DWe7ol-H.mjs | 5.48 kB | 0% |
| shared/cli.DUZiDcEB.mjs | 804 B | 0% |
| shared/cli.D7pftKtD.mjs | 294 B | 0% |
| shared/cli.yR2Mj6Rb.mjs | 1.23 kB | 0% |
| shared/cli.BSm0_9Hr.mjs | 107 B | 0% |
| shared/cli.8etUNhu4.mjs | 836 B | 0% |
| shared/cli.DlcAx0De.mjs | 1.04 kB | 0% |
| shared/cli.DaI-EKv1.mjs | 107 B | 0% |
| shared/cli.C935N1ss.mjs | 687 B | 0% |
Looking, I think the issue is not about the pull_request_target but in fact the token permissions required by the action.
you can see it correctly commented above - so I'm not quite sure what is failing
@danielroe that is real odd, i cant reason about it anymore :
As you mentioned here https://github.com/nuxt/cli/pull/705#issuecomment-2637253600 there was a check that passed https://github.com/nuxt/cli/actions/runs/13159970893/job/36725939692
I looked upon it and looks like the target commits are: my fork commit 10ca2f250c78139b7dce239c3e07d00946212b0e https://github.com/schirrel/cli/commit/10ca2f250c78139b7dce239c3e07d00946212b0e nuxt/cli commit 6e937392db3dd62e97b230041e4e0ac13f956154 https://github.com/nuxt/cli/commit/6e937392db3dd62e97b230041e4e0ac13f956154
The only difference after that commit on both repos is the merge of the dependabot bf6020b0ff02100f318ebae74d984f840ed4a67c 🤔 it does not make sense
I think this was resolved in https://github.com/nuxt/cli/pull/999.
thank you for your work on this ❤️