-
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
Replace wp-scripts env usage with wp-env in CI. #20280
Changes from all commits
cf8ce46
03ed63c
b5f8ea1
48e803a
172d59b
8a66380
a9ad63f
4991431
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,15 @@ module.exports = async function start( { spinner, debug } ) { | |
config.coreSource.path, | ||
config.coreSource.testsPath | ||
); | ||
|
||
// Ensure the tests uploads folder is writeable for travis, | ||
// creating the folder if necessary. | ||
const testsUploadsPath = path.join( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we chmod more broadly to allow other things to have write access (e.g. chmod all of This may also remove the need for a different There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That seems like a good call. I can put together a separate PR to cover it. |
||
config.coreSource.testsPath, | ||
'wp-content/uploads' | ||
); | ||
await fs.mkdir( testsUploadsPath, { recursive: true } ); | ||
await fs.chmod( testsUploadsPath, 0o0767 ); | ||
} | ||
} )(), | ||
|
||
|
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 had to also add
"WP_PHP_BINARY": "php"
here, as the default config was being overwritten by the .wp-env.override file. Using the override file like this won't be very maintainable.Perhaps looking into command line options for overriding individual settings could be an option. e.g.:
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.
we are also looking to add support for setting the config for different environments in .wp-env.json so that we can turn of SCRIPT_DEBUG etc for the tests environment without having to override anything.