You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 04d2d0d
Browse filesBrowse the repository at this point in the historyBrowse files
Size the coverage shards to the package, and cope without sharding support
Every runner spends about a minute on its setup, so packages now get one
coverage runner per 50 scenarios, up to the coverage-shards input.
Versions of wp-cli/wp-cli-tests without sharding support ignore
WP_CLI_TEST_SHARD and would run every scenario on every shard. With those,
only the first shard runs the scenarios, so that each still runs once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .github/workflows/reusable-testing.yml
+10-4Lines changed: 10 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ on:
19
19
required: false
20
20
default: true
21
21
coverage-shards:
22
-
description: 'Number of runners to split the Behat tests with code coverage across.'
22
+
description: 'Maximum number of runners to split the Behat tests with code coverage across. Packages get one runner per 50 scenarios, up to this number.'
23
23
type: number
24
24
required: false
25
25
default: 4
@@ -482,6 +482,7 @@ jobs:
482
482
INPUTS_MINIMUM_WP: ${{ inputs.minimum-wp }}
483
483
WITH_COVERAGE: ${{ inputs.with-coverage }}
484
484
COVERAGE_SHARDS: ${{ inputs.coverage-shards }}
485
+
SCENARIOS_PER_SHARD: 50
485
486
run: |
486
487
if [[ $FILE_EXISTS == 'true' && $DOCS_ONLY != 'true' ]]; then
487
488
MATRIX=$(jq -c \
@@ -515,9 +516,14 @@ jobs:
515
516
' <<< "$BASE_MATRIX" )
516
517
517
518
# Collecting code coverage makes the Behat tests several times slower, so these
518
-
# run as a job of their own, split across runners. An entry can set its own
0 commit comments