-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
GitHub Actions: Build Plugin zip, store as artifact on every PR #26746
Conversation
Size Change: 0 B Total Size: 1.19 MB ℹ️ View Unchanged
|
Hm, what I think would be more useful is to have a build repository (so it is version controlled and bisectable) that syncs with every commit in master. Testers can download a zip straight from the build repository on Github (UI is familiar and less steps). A potential Gutenberg bleeding edge plugin can just pull the changes from this repository (which would be an svn mirror of this build repository). |
I think that the zips generated from this PR would be available for GH I think that those should be accessible via GH's REST API, so they would also be available for fetching by a bleeding edge plugin as you describe 🤔 |
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 find this helpful and likely to make testing easier.
In the future, I can imagine scenarios where the zip artifact is used in other parts of the build, for example it could be installed as the plugin for the e2e tests. That would help to prevent issues that only manifest in the zipped plugin such as #25792.
I'd approve, but I don't want to overstep and think approval from the folks who own the build + deploy is important for this type of change.
paths-ignore: | ||
- '**.md' | ||
push: | ||
branches: [master] |
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 assume this is a different yaml array syntax, but I expected a single-item list like:
branches:
- master
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.
Good point! FWIW, this was copy-pasted from the existing unit-test GH action, and I think that most of the other actions also have it like this, but we can change it here (and maybe file a PR to change it for the existing actions).
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x |
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.
It might be nice to use .nvmrc
version. There are some good suggestions here: actions/setup-node#32
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.
(Same as #26746 (comment) applies.)
0a0a80b
to
fa37f2a
Compare
fa37f2a
to
7265734
Compare
There was a test failure that looks unrelated. I've gone ahead and rebased. |
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 think this adds value and downsides are not apparent to me. Let's go ahead and land this, it's easy enough to remove.
Thans a lot, Jon! |
Just want to say major kudos for adding this; thank you! This greatly lowers the barriers/obstacles for users to test out pull requests: it's no longer require for someone to have git installed, configured to check out a pull request! I noticed isn't applicable to any PRs that were first made before this was merged understandably; although I'm not sure if that also applies to PRs that pull changes from the master branch since then. |
Description
Spun off from #19626 since apparently this functionality was found useful 😄
Build the plugin zip on every PR and store the file as an artifact so it can be used for testing outside of a dev environment.
How has this been tested?
Click the 'gutenberg-plugin` link in order to start the download
This will download a zip named
gutenberg-plugin.zip
which contains the actual plugin zip (gutenberg.zip
). The double-zip is due to a limitation of GitHub'supload-artifacts
action. We can work around this (by changing the action to upload files individually, and rely on GH to bundle them in a zip anyway), but that might have the downside that if we want to pass artifacts between jobs (which might come in handy e.g. for e2e tests and the like), we'll also have to pass artifact contents individually, which seems suboptimal. I thus opted to keep the double zip for now.Types of changes
New dev feature.