-
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
Testing: Add verification for Create Block to Continues Integration #23195
Conversation
Size Change: 0 B Total Size: 1.12 MB ℹ️ View Unchanged
|
73b5393
to
be58239
Compare
@gziolo Whats the reasoning behind making the (love the setting though :) ) |
I wasn't fully happy about that as well, but apparently this is the recommended way of dealing with booleans in
|
62e9cd6
to
8c1c8b3
Compare
I forced pushed to see if new GitHub action triggers and it looks like I didn't break anything :) |
on: | ||
push: | ||
paths: | ||
- 'packages/**' |
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'm still unsure of what would be important here, maybe package*.json
to cover the case when dependencies change. Although it would probably mean that one of the packages changed as well.
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 initially thought about only adding @WordPress dependencies for create-block but it has none. 🙈
In this case probably all of
gutenberg/packages/scripts/package.json
Lines 36 to 42 in cb10e2d
"@wordpress/babel-preset-default": "file:../babel-preset-default", | |
"@wordpress/dependency-extraction-webpack-plugin": "file:../dependency-extraction-webpack-plugin", | |
"@wordpress/eslint-plugin": "file:../eslint-plugin", | |
"@wordpress/jest-preset-default": "file:../jest-preset-default", | |
"@wordpress/npm-package-json-lint-config": "file:../npm-package-json-lint-config", | |
"@wordpress/postcss-plugins-preset": "file:../postcss-plugins-preset", | |
"@wordpress/prettier-config": "file:../prettier-config", |
packages/scripts/package.json
and packages/create-block
?
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.
There is also @wordpress/browserlist-config
or @wordpress/element
that is used by Babel. I said, it might be tricky to identify all dependencies used :)
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.
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.
Let's use the current list and see how it goes.
6a16eea
to
2dcfc7c
Compare
Travis failures for e2e tests are unrelated to changes in this PR. I'll merge it regardless Travis complaints. |
Description
We had recently two regressions for scaffolded JS and CSS code using
ESNext
template throughnpm init @wordpress/block
:At least one of them (JSDoc) was introduced by breaking changes introduced in
@wordpress/scripts
. The other could be just a bug introduced during refactoring. Regardless to that, it's been on my mind for some time and it was also discussed several times in the past in PRs and on WordPress Slack. It was also raised by @ocean90 earlier today while I already started working on this PR 😄 (#23188 (review)):This PR adds GitHub action that should automate the process of verification changes that could impact the default block scaffolded with Create Block. It uses a script that validates whether
npm init @wordpress/block
works properly with the latest changes applied to themaster
branch. It purposefully avoids installing@wordpress/scripts
package from npm when scaffolding a test block and uses the local package by executing everything from the root of the project.To make it possible and also to give the same amount of control to user two new CLI options were introduced:
How has this been tested?
The script that is used for automated testing can be also executed locally:
New GitHub action that will run on every PR opened: