* Add disableHpos test env variable
* Update events for HPOS disabled tests
* Add pull_request event to test the env
* Remove the pull_request event
* Add changelog
* Make the disableHpos var a boolean
* Also set the env in ci.yml
* Remove console log statement
* Print woocommerce_custom_orders_table_enabled
* Run test setup script again to check output
* Capture env setup output and print it
* Get woocommerce_custom_orders_table_enabled value in test env script
* Get more details on HPOS setting
* Remove the DISABLE_HPOS logic from test env setup script
* Use DISABLE_HPOS instead of ENABLE_HPOS everywhere
* Turn off no-console and jest/no-standalone-expect eslint rules for api core tests
* Test API tests with HPOS disabled
* Fix eslint error
* Clean up debug statements
* Remove pull_request test trigger
* Include performance tests job in the needed jobs for evaluation
* Use Github api to get the workflow jobs status
* Evaluate project-jobs
* See results
* Check for cancelled jobs
* Add evaluate-project-jobs.js and rename optional jobs
* Fix script path
* Checkout first
* And then fix the path again.
* Update env variable name and be more detailed in what are the required variables
* Use a flat matrix env variable
* Update to trigger test jobs
* Use the jobs name to evaluate optional requirement
* Fix conditions
* Prettier print
* Test lint job failure
* Remove unused MATRIX env variable
* Fix test
* Remove unused MATRIX variable check
* Only run my account e2e tests
* Remove unused function
* Nicer console printing
* Revert change that triggers failing lint job
* Force failing e2e test
* Revert e2e test command and forced failure
* Added test data and test mode
* Added more test data
* Fixed lint errors and warnings
* Exclude .github folder from eslintignore
* Change to trigger everything
* Revert change to trigger everything
* Update env setup script to disable hpos
* Use DISABLE_HPOS instead of ENABLE_HPOS
* Log HPOS state
* Configure project for core e2e with HPOS disabled
* Add event argument for ci-jobs util
* Add event option for test jobs
* Add support for github events
* Add changelog
* Configure HPOS tests to run on pull_request
* Fix utils tests for undefined commandVars
* Added some tests for the event configuration
* Revert event for HPOS e2e to push
* Use matrix name in artifact name to avoid duplication
* Test with pull_request event
* Use job-index for unique artifacts names
* Revert event for HPOS e2e to push
* Add api tests for HPOS disabled
* Use unique artifact name for api tests
* Revert event for HPOS disabled api tests to push
* Rebuild monorepo utils to fix a merge conflict
* Updated wording
* Updated deprecated gh-script action to node 20 variant
* Minor change in e2e test to trigger CI
* Revert e2e test change
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Move deprecated workflows to deprecated folder
* Configure new test job for metrics
* Add changelog
* Update start command
* Update start command
* Archive metrics results
* Fix script path
* Fix name in archive results condition
* Add the actual run command for pull_request event
* Run with pnpm --filter
* Test run for push event
* Revert test conditions
* Add WP_ARTIFACTS_PATH env variable
* Update path to readme.txt
* Revert github event conditions
* Add CODEVITALS_PROJECT_TOKEN env
* Set WP_ARTIFACTS_PATH on job level
* Add blocks templates in the changes list
Unfortunately, it looks like we need to build in order
to be able to lint. This makes sense since some
projects will lint imports from others that haven't
been built yet.
This adds support for using the `pnpm utils ci-jobs` command in our `ci.yml` file. One of the bigger benefits to this change too is that we're now distributing a bundled version of the utils tool. This lets us run it without actually having to install the repo and will let us speed up any workflows that currently do.
This makes some adjustments for consistency in style as well as making
improvements to usability and performance. It also updates all of the
pinned hashes to pull in any fixes that have been made.
* Remove -- -- from scripts that fixed issue in pnpm 6, fix a couple TS issues in sep packages
* Minor fixes to analyzer scripts and doco based on pnpm 7
* Add dompurify types to data package to avoid TS errors
* Remove pnpx in favor of pnpm exec
* Modify the code analyzer to respect pnpm version if present.
* Update instructions for running recursive lint, add comments to explain
* 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
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.