Skip to content

Boost: Add Boost to docker phpunit command #44283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

LiamSarsfield
Copy link
Contributor

@LiamSarsfield LiamSarsfield commented Jul 11, 2025

Proposed changes:

  • Allows Boost to use the jetpack docker phpunit command.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

N/A

Does this pull request change what data or activity we track or use?

N/A

Testing instructions:

  • Checkout branch locally
  • Verify that the appropriate composer libraries are installed within Boost via going to the Boost directory (projects/jetpack/projects/plugins/boost) and running composer install
  • Run jetpack docker phpunit boost to verify that the command works as expected, and all tests pass
  • Run jetpack docker phpunit boost --testsuite critical-css --php 8.3 in order to test Critical CSS.
    • Note: WorDBless requires PHP 8.3 to run, so adding the php argument for 8.3 is required.
  • Note: If you run jetpack docker phpunit boost again after, you may receive errors, you may have to run composer install install to install the appropriate vendor files for 8.3 again.

Copy link
Contributor

github-actions bot commented Jul 11, 2025

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@github-actions github-actions bot added [Status] In Progress [Tools] Development CLI The tools/cli to assist during JP development. [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Jul 11, 2025
@@ -397,6 +397,16 @@ const buildExecCmd = argv => {
unitTestArgs.plugin = 'jetpack';
unitTestArgs.envVars = [ 'JETPACK_TEST_WPCOMSH=1' ];
break;
case 'boost':
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anomiex Just a heads up regarding this PR; Boost should now work with jetpack docker phpunit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests need an full WordPress environment up to run? If they can be run on the host (possibly with WorDBless or Brain/Monkey), without going through Docker, that's preferable.

@LiamSarsfield LiamSarsfield added [Status] Needs Review This PR is ready for review. [Type] Janitorial and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Jul 11, 2025
@LiamSarsfield LiamSarsfield requested review from kraftbj, dilirity and a team July 11, 2025 14:39
@LiamSarsfield LiamSarsfield changed the title Boost: Add Boost to docker phpunit Boost: Add Boost to docker phpunit command Jul 11, 2025
@LiamSarsfield LiamSarsfield marked this pull request as ready for review July 11, 2025 14:39
Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to update this documentation string too:

'Which PHPUnit tests to run:\n- jetpack: Jetpack plugin tests\n- jp-multisite: Jetpack plugin multisite tests.\n- jp-wpcomsh: Jetpack plugin tests with wpcomsh installed.\n- crm: Jetpack CRM plugin tests.\n- wpcomsh: Wpcomsh plugin tests.',

@kraftbj
Copy link
Contributor

kraftbj commented Jul 11, 2025

@LiamSarsfield Can you articulate the advantages of this over either jetpack test php plugins/boost or jp test php plugins/boost?

@kraftbj kraftbj added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review This PR is ready for review. labels Jul 11, 2025
@LiamSarsfield
Copy link
Contributor Author

As I'm AFK next week, and this isn't a priority, I'm going to revert this back to draft so I can have a look at the comments when I get back.

@LiamSarsfield LiamSarsfield marked this pull request as draft July 11, 2025 18:56
@kraftbj kraftbj closed this Jul 31, 2025
@github-actions github-actions bot removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Tools] Development CLI The tools/cli to assist during JP development. [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants