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
[Vue] Adding a "build vue" github action to build vue files #18080
Conversation
It can only be executed/tested when it's in the base branch. But you could create a fork where you add the action in the base branch to test it on the fork. |
@diosmosis looks overall good to me. Might wait with merging until @sgiehl is back from holidays. Sometimes there might be merge conflicts when different PR changed files in a same plugin etc. In that case we simply need to rebase 4.x-dev into the branch, possibly resolve merge conflicts manually (probably would need to call the build command ourselves) and commit again? Not sure if I fully understand what the action does. |
It just runs
Mostly, yes. The UMD files don't need to be looked at, other merge conflicts have to be handled, then either run build manually, or push and this command would build again. It doesn't solve the case where the merge is fine except for the UMD files which we just want to build again. Not sure there's a way around that. |
@sgiehl updated the pr |
.github/workflows/buildvue.yml
Outdated
exit 1; | ||
fi | ||
|
||
VUE_FILES_MODIFIED=$(git diff HEAD^ --name-only plugins/*/vue/**/* | wc -l) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't this only look at the last commit? So if someone pushes multiple commits including some vue files, but the last commit doesn't contain any it would abort here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, checking the base branch now. So it will always rebuild even if the last set of commits doesn't modify vue file, but somewhere the PR does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @sgiehl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, nvm, it seems non-trivial to be able to reference commits/branches before the checkout command is run
@sgiehl ok, it's working now |
@@ -0,0 +1,137 @@ | |||
name: Build Vue files | |||
|
|||
on: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might make sense to make it possible to manually trigger that action for a branch maybe:
on: | |
on: | |
workflow_dispatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this makes sense, since right now it will always run. I think it's better not to have to think about when it should be run? Especially since this is a safeguard for when people have already forgotten. If the command doesn't work for some reason, we can always build manually until its fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left another comment. Otherwise I guess it looks fine. Hard to test though. So guess we should merge and adjust it later if anything doesn't work as expected.
@diosmosis had a very quick look and looks all good to me. Looks good to merge to me and we can always change things as needed IMO |
Description:
I haven't used github actions before so this is mostly a guess. @sgiehl can you take a look and see if there's anything off? I'm also not entirely sure how to test this. Unless I can invoke the action in this PR w/o merging into 4.x-dev?
Review