* Added Monorepo Setup Action
This action will handle the installation, building, and caching for all
projects within the monorepo. It has inputs for skipping builds and
filtering so that only specific packages are installed and built.
* Removed Test Caching
Caching the results of tests, while an interesting way to avoid
unnecessary execution, seems error-prone. We can't adequately
capture the environment such that we can rely on this working.
For instance, changes in PHP version might break PHPUnit tests,
but, cached runs will be shared across different workflows.
It seems better to just not cache it and rely on people only testing
code that has actually changed in the pull request.
* Added Input Parsing
This SHOULD allow for passing multiple filters as an array argument.
* Updated Workflows
This fully utilizes the new action across all of the workflows.
* Always Cache Build Output
Since there may be other commands run that populate the cache, we
should make sure that we are always caching just in case.
* Change package json commands and turbo repo config to allow for greatly simplifying running turbo
* Remove require-turbo script which was causing caching issues
* Colorize CI output from scripts
* Add missing changelog script to extend-cart-checkout-block
* Update woocommerce admin scripts to align more with monorepo
* Add changelog
* Add dev script back in
* Add install-if-deps-outdated back into build script
* Remove --force from dev script and add WC_ADMIN_PHASE to turbo cache key
* Remove install-if-deps-outdated from build
* Add composer install step to pr unit tests workflow
* Remove old install scripts, that are not needed anymore
* Make sure client changes are part of the cache hit
* Add composer install to code coverage and code sniff as well
* Add composer_no_dev input to install-build workflow
* Add sass dependency to woocommerce/admin/client turbo cache
This replaces all `nx` commands with `turbo` commands and removes Nx from the repository. All of the `project.json` files have been removed and any commands that broke with Turborepo have been adjusted.
This includes:
- Changing "Requires PHP" in woocommerce.php
- Changing "require-php" and "config-platform-php" in composer.json
- Bumping pelago/emogrifier to ^6.0 in composer.json
- Bumping maxmind-db/reader to ^1.6 in composer.json
- Bumping composer/installers to ^1.9 in composer.json
(bump to 2.0 not possible due to conflict with Admin package)
- Removing jobs for 7.0/.1 unit test runs in CI
- Explicitly specifying the PHPUnit version to be 7.5,
otherwise it will install v8 which isn't compatible with
WordPress <5.9
The problem was that PHP 8 requires setting up a different version of
PHPUnit, and after doing that two versions were in place, one in
'vendor/phpunit' and another one in 'bin/composer/phpunit'; the
autoloader was picking the former but it should pick the later.