web-stories-wp icon indicating copy to clipboard operation
web-stories-wp copied to clipboard

Use composer to install WordPress for unit tests

Open spacedmonkey opened this issue 3 years ago • 2 comments

Feature Description

Currently, there is a bash script to install WordPress for unit tests. However with packages like wp-phpunit this is not required. Installing via composer, means that install will be quicker and cached.

Related https://github.com/google/site-kit-wp/pull/2581

Alternatives Considered

Additional Context

spacedmonkey avatar Feb 10 '22 17:02 spacedmonkey

Would have to see how well it works with PHPUnit-Polyfills.

Also worth noting that switching to wp-env (if that's ever easily possible) would make this obsolete because then everything is running within a Docker container.

Putting this in the backlog for now.

swissspidy avatar Feb 10 '22 19:02 swissspidy

A good example for CI is the performance project.

spacedmonkey avatar Feb 10 '22 19:02 spacedmonkey

Current blocker for wp-phpunit: https://github.com/wp-phpunit/issues/issues/10

swissspidy avatar Nov 24 '22 09:11 swissspidy