Make WordPress Core

Opened 7 weeks ago

Closed 7 weeks ago

#61350 closed enhancement (duplicate)

Composer slow - add script to skip install

Reported by: kkmuffme's profile kkmuffme Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.9
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:

Description

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.

Change History (2)

This ticket was mentioned in PR #6709 on WordPress/wordpress-develop by @kkmuffme.


7 weeks ago
#1

  • Keywords has-patch added

Add npm run test:php-skip-install script to speed up tests/debugging in docker

Trac ticket: https://core.trac.wordpress.org/ticket/61350

#2 @swissspidy
7 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #57189.

Note: See TracTickets for help on using tickets.