Opened 18 months ago
Closed 13 months ago
#59632 closed task (blessed) (fixed)
Test building Gutenberg plugin in GitHub Actions
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | Cc: |
Description
Every so often a situation comes up where a dependency update in Core causes a problem in the Gutenberg plugin build scripts, or vice versa.
For examples, see #58671, or more recently, an instance where a version of Puppeteer in Core is causing problems within the Gutenberg build process.
Having a wordpress-develop
checkout that contains a gutenberg
checkout within the src/wp-content/plugins
directory is a very common contributor setup. Having a workflow that verifies both build processes continue to work could help catch these situations earlier.
Change History (11)
This ticket was mentioned in PR #5499 on WordPress/wordpress-develop by @desrosj.
18 months ago
#2
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/59632.
#3
@
18 months ago
I've started exploring adding some logic to test the Gutenberg plugin's build process in the context of a wordpress-develop
checkout.
For testing purposes, I reintroduced the failure caused by grunt-contrib-qunit
to confirm the issue is caught in these tests.
Here's a run after re-applying the fix.
However, I was unable to reproduce the issue described in #58671. It's possible that issue has been resolved since the ticket was created, though.
The attached PR also renames the Test npm
workflow to be more generic. While we are testing that npm dependencies install correctly, what is actually being tested is that the build process is successful. If this is the road we choose to go down, the changes will either need to be backported, or the Testing old branches
workflow will need to be updated to account for the workflow being called two different things in different branches once the 6.4 branch is created.
#4
@
17 months ago
- Owner set to desrosj
- Resolution set to fixed
- Status changed from new to closed
In 56976:
#5
@
17 months ago
- Keywords fixed-major added
- Milestone changed from Future Release to 6.5
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening to address a few follow ups from this.
- At a minimum, the
test-old-branches.yml
workflow will need to be updated to account for this name change. - This may be worth backporting to the 6.4 branch.
- We could also consider backporting this further to all branches currently supported by the Gutenberg plugin (currently 6.2 and up).
- If it is backported, there needs to be a way to pin a branch so that the proper version of Gutenberg is tested in the future. For example, after 4 more releases, if a commit is made to the 6.4 branch, the workflow should not test Gutenberg
trunk
, but rather thewp/6.4
branch. - If it's not backported, then the Gutenberg tests should not run on branches older than the current one.
https://github.com/WordPress/gutenberg/pull/52993#issuecomment-1764032718 looks like a TypeScript configuration issue. Specifying
typeRoots
intsconfig.json
should prevent TypeScript from looking in all the parent folders, but somehow it's still doing it.