[wp-trac] [WordPress Trac] #61350: Composer slow - add script to skip install
WordPress Trac
noreply at wordpress.org
Mon Jun 3 05:19:48 UTC 2024
#61350: Composer slow - add script to skip install
------------------------------+-----------------------------
Reporter: kkmuffme | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: 5.9
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
As a followup to https://core.trac.wordpress.org/ticket/53945
`test:php` is extremely slow in docker, partly bc of the composer update,
partly bc of the install.
Since https://core.trac.wordpress.org/ticket/43432 added a skip install
flag too, I think there should be script to easily use that.
I created a `"test:php-skip-install": "node ./tools/local-
env/scripts/docker.js run -e WP_TESTS_SKIP_INSTALL=1 php
./vendor/bin/phpunit",` script for comparison.
Benchmark:
```
time npm run test:php -- --filter pseudoEmptyTest
real 0m46.065s
user 0m0.046s
sys 0m0.136s
time npm run test:php-skip-install -- --filter pseudoEmptyTest
real 0m22.505s
user 0m0.015s
sys 0m0.136s
```
This saves up to 50% runtime.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61350>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list