-
Notifications
You must be signed in to change notification settings - Fork 50
ci: run magento coding standard for pull requests #2
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
Conversation
Thanks for contributing this, @danslo ! 🧡
I think you answered this question with your follow-up comment:
I can't foresee an instance where we would want somebody to push changes directly so, personally, I think this current setup of running only for PRs is fine 🙂
I think using the Magento coding standard and being consistent with it is a good idea - it's not even an awful set of standards IMO 😅 If we disagree or have ideas for changes then adopting the Magento standards encourages us to push those changes there. Granted this is likely going to be slower than adopting a separate set of standards but I feel like it presents a more unified image 🤷♂️ |
@danslo it is possible to compute the base sha of the last passing build, which may allow diffing against pushes. Additionally, what's the argument against pinning with the lock file? I would much prefer not to have failing builds "because". Additionally, is there a way to move this into: https://github.com/graycoreio/github-actions-magento2 instead? It would be nice if we had a central store (outside the repo) so that external users can use the exact same actions we do internally. |
I think I agree!
Yeah it should certainly be possible, I'm trying to figure out if we really need it.
I guess two-fold:
That's probably a good idea - and it also dodges the lock file problem! Anyone opposed to this? |
b0ef4e1
to
b952abf
Compare
b952abf
to
e3d6190
Compare
Action moved here. Current PR has been changed to use that action. Permissions are set to read-only. Changing from draft to ready for review! |
@Vinai I think we can merge it |
Thank you @danslo for the MR, @damienwebdev, @pykettk and @ihor-sviziev for your thoughts and time! |
…an 0. Can't upload specific image
…an 0. Can't upload specific image
…an 0. Can't upload specific image
…an 0. Can't upload specific image
…an 0. Can't upload specific image
…an 0. Can't upload specific image
…an 0. Can't upload specific image
…an 0. Can't upload specific image
…an 0. Can't upload specific image
…an 0. Can't upload specific image
…an 0. Can't upload specific image
…an 0. Can't upload specific image
Replaced TinyMCE7 with TinyMCE6
Description
Runs the Magento Coding Standard on Pull Requests.
The check will only be performed for files that were added/modified within the pull request.
After installing dependencies from the lock file, we update the coding standard to the latest version.
The lock file might have an older version, in my case it was locked to v23, but we're already at v25 (which made me run into this issue.
Some questions:
'2.[0-9]-develop'
?pull_request
, not forpush
. Is there a scenario where we would need to run onpush
as well? We should assume that direct pushes to the main branch is prohibited to any contributor: any code that we do introduce is done by PRs, which we are checking here. Supportingpush
might be trickier, as we currently rely ongithub.event.pull_request.base.sha
.Would love to hear your thoughts!