Skip to content

Add a step to create several sites at once - #407

Open
schlessera wants to merge 2 commits into
setup-commands-stepfrom
create-sites-step
Open

schlessera wants to merge 2 commits into
setup-commands-stepfrom
create-sites-step

Conversation

@schlessera

@schlessera schlessera commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Multisite scenarios often create their sites one at a time with wp site create before the actual test, each in its own process. Given these sites: creates a list of sites in a single process and can save their IDs into variables.

Builds on #400. Fixes #379.

Measurements

Each draft pull request below points wp-cli/wp-cli-tests at this branch. Its Testing workflow ran through workflow_dispatch, together with the same workflow on an unchanged copy of the default branch, three times each where possible. Times are the Run Behat step summed over the matrix jobs that ran in every measured run (median over runs, in job minutes). Retried jobs passed only because behat-rerun repeated their failed scenarios.

Repository Jobs Runs Before (min) After (min) Change Median per job Failed jobs Retried jobs
wp-cli/core-command#352 51 3/3 261.6 248.4 -5.0% -4.2% 0 → 51 0 → 51
wp-cli/entity-command#680 51 3/3 932.7 968.9 +3.9% -0.4% 3 → 3 8 → 10
wp-cli/wp-cli#6443 33 3/3 322.6 328.6 +1.9% -1.8% 3 → 3 3 → 3
wp-cli/cron-command#152 51 3/3 70.0 70.7 +1.0% +0.8% 3 → 3 3 → 3
Total 1586.9 1616.6 +1.9%

Failing scenarios

Scenarios that failed at least once in a measured run, including runs where behat-rerun then passed them.

  • wp-cli/core-command: failing only with the change: features/core-update-db.feature (Update db across network) (3/3 runs), features/core-update-db.feature (Update db across network, dry run) (3/3 runs), features/core-update-db.feature (Update db only updates sites from the current network in multinetwork setup) (3/3 runs)
  • wp-cli/entity-command: failing with and without the change: features/post.feature (Filtering by meta, time of day and order) (2/3 runs)
  • wp-cli/cron-command: failing with and without the change: features/cron.feature (Testing WP-Cron) (3/3 runs)

Notes

  • core-command#352: all of its conversions are in the core update-db network scenarios, which first downgrade WordPress with wp core download --version=5.4. Creating the sites in a single process then fails with Table 'wp_cli_test.wp_2_posts' doesn't exist, while separate wp site create processes succeed.

@schlessera schlessera added the scope:testing Related to testing label Oct 30, 2026
@schlessera
schlessera requested a review from a team as a code owner October 30, 2026 19:42
@schlessera schlessera added the scope:testing Related to testing label Oct 30, 2026
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4005db00-e7de-44a6-bb0d-e81fd10dd8d3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/Context/GivenStepDefinitions.php 0.00% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

schlessera and others added 2 commits October 31, 2026 04:11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant