Allow customization of the ARTIFACTS_PATH via WP_ARTIFACTS_PATH env var - #35371
Conversation
|
It would be good to update the changelog file for the scripts package, and maybe add some documentation along with this change. Some details here on updating the changelog - https://github.com/WordPress/gutenberg/blob/HEAD/packages/README.md#maintaining-changelogs. |
|
@talldan Of course! I'm not sure if the location of the documentation makes sense. I didn't see anything specific in the README already about the artifacts where it would make sense to add information about the update in this PR so I added a new section. Also, I don't see any other section with more than one Also, of course, notes welcome on the language and wording I've chosen. Thanks! |
talldan
left a comment
There was a problem hiding this comment.
Looks great, thanks for updating the PR!
kevin940726
left a comment
There was a problem hiding this comment.
LGTM 👍. Thank you for making this PR
|
Awesome thanks @kevin940726 |
Description
Per #34797
Allows 3rd-party customization of the ARTIFACTS_PATH used by
@wordpress/scriptswhen running E2E tests by defining WP_ARTIFACTS_PATH as an environment variable.If the env variable is empty, falls back to the default location.
How has this been tested?
I've manually patched my code into the
@worpress/scriptspackage in my plugin'snode_modulesdir and run my e2e tests, forcing a failure and ran tests once without an env var set to ensure artifacts end up in the intended location and again after adding the new env var to ensure that artifacts end up in the custom location.Edit: I've also tested this against this repo's
npm run test-e2eboth with the default usage (no ENV var) and with the ENV var set at runtime, eg:WP_ARTIFACTS_PATH=custom/artifacts npm run test-e2eAll these tests result in failed tests storing artifacts in the expected location
Screenshots
Types of changes
New feature (non-breaking change which adds functionality)
Checklist:
*.native.jsfiles for terms that need renaming or removal).