GoogleForCreators / web-stories-wp

Web Stories for WordPress
https://wp.stories.google
Apache License 2.0
765 stars 177 forks source link

Use composer to install WordPress for unit tests #10541

Closed spacedmonkey closed 1 year ago

spacedmonkey commented 2 years ago

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

swissspidy commented 2 years ago

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.

spacedmonkey commented 2 years ago

A good example for CI is the performance project.

swissspidy commented 1 year ago

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