[wp-trac] [WordPress Trac] #53945: Local test workflow changes for installing Composer dependencies
WordPress Trac
noreply at wordpress.org
Wed Sep 1 17:10:25 UTC 2021
#53945: Local test workflow changes for installing Composer dependencies
------------------------------------------------+--------------------------
Reporter: hellofromTonya | Owner: johnbillion
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 5.9
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch has-testing-instructions | Focuses:
------------------------------------------------+--------------------------
Changes (by hellofromTonya):
* keywords: has-patch has-testing-instructions commit => has-patch has-
testing-instructions
Comment:
[https://github.com/WordPress/wordpress-develop/pull/1647 PR 1647]
proposes a viable solution
- Removes the installation logic from `tools/local-env/scripts/install.js`
- Removes the `composer update` cascading command from the `test:php-
composer` script in the `package.json` file
Both of these changes fixes the broken tests on PHP 8.1 in the CI GHA.
Why? The `phpunit-tests.yml` workflow includes logic to:
- run the right command for installing the Composer dependencies
([https://github.com/WordPress/wordpress-
develop/blob/29531de7685a8d166707a0f2409ab8517b1b2dff/.github/workflows
/phpunit-tests.yml#L143-L152 see it here])
- uses `npm run test:php-composer` to run the tests
([https://github.com/WordPress/wordpress-
develop/blob/29531de7685a8d166707a0f2409ab8517b1b2dff/.github/workflows
/phpunit-tests.yml#L192 starts here])
What about contributors testing locally?
- Documentation in [https://make.wordpress.org/core/handbook/testing
/automated-testing/phpunit/#setting-up-the-docker-container-environment
the handbook] and [https://github.com/WordPress/wordpress-
develop/blob/master/README.md#to-run-the-tests the repo's README.md] state
to use `npm run test:php`.
- Removing the composer install from the `npm run env:install` process
solves the problem
[https://core.trac.wordpress.org/ticket/53945#comment:20 I noted above]
where folks doing local testing don't need these dependencies.
IMO the `npm run test:php-composer` can exist for the CI's automated test
runs while the local testing recommendation remains `npm run test:php`.
cc @johnbillion @netweb @desrosj What do you all think?
Note: I'm removing `commit` keyword until there's consensus.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53945#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list