Skip to content

Commit

Permalink
Merge changes published in the Gutenberg plugin "release/15.9" branch
Browse files Browse the repository at this point in the history
  • Loading branch information
gutenbergplugin committed May 24, 2023
1 parent e936127 commit e6eee8d
Show file tree
Hide file tree
Showing 456 changed files with 13,071 additions and 7,727 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
/packages/report-flaky-tests @kevin940726

# wp-env
/packages/env @noahtallen
/packages/env @noahtallen @ObliviousHarmony @t-hamano

# PHP
/lib @spacedmonkey
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
WP_VERSION=$(awk -F ': ' '/^Tested up to/{print $2}' readme.txt)
IFS=. read -ra WP_VERSION_ARRAY <<< "$WP_VERSION"
WP_MAJOR="${WP_VERSION_ARRAY[0]}.${WP_VERSION_ARRAY[1]}"
./bin/plugin/cli.js perf "wp/$WP_MAJOR" "$PREVIOUS_RELEASE_BRANCH" "$CURRENT_RELEASE_BRANCH" --wp-version "$WP_MAJOR"
./bin/plugin/cli.js perf "wp/$WP_MAJOR" "$PREVIOUS_RELEASE_BRANCH" "$CURRENT_RELEASE_BRANCH" --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR"
- name: Compare performance with base branch
if: github.event_name == 'push'
Expand Down
40 changes: 32 additions & 8 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,44 @@ jobs:

- name: Docker container debug information
run: |
npm run wp-env run tests-mysql "mysql --version"
npm run wp-env run tests-wordpress "php --version"
npm run wp-env run tests-wordpress "php -m"
npm run wp-env run tests-wordpress "php -i"
npm run wp-env run tests-wordpress "/var/www/html/wp-content/plugins/gutenberg/vendor/bin/phpunit --version"
npm run wp-env run tests-wordpress "locale -a"
npm run wp-env run tests-mysql mysql -- --version
npm run wp-env run tests-wordpress php -- --version
npm run wp-env run tests-wordpress php -m
npm run wp-env run tests-wordpress php -i
npm run wp-env run tests-wordpress /var/www/html/wp-content/plugins/gutenberg/vendor/bin/phpunit -- --version
npm run wp-env run tests-wordpress locale -a
- name: Running single site unit tests
if: ${{ ! matrix.multisite }}
run: npm run test:unit:php
run: |
set -o pipefail
npm run test:unit:php | tee phpunit.log
- name: Running multisite unit tests
if: ${{ matrix.multisite }}
run: npm run test:unit:php:multisite
run: |
set -o pipefail
npm run test:unit:php:multisite | tee phpunit.log
# Verifies that PHPUnit actually runs in the first place. We want visibility
# into issues which can cause it to fail silently, so we check the output
# to verify that at least 500 tests have passed. This is an arbitrary
# number, but makes sure a drastic change doesn't happen without us noticing.
- name: Check number of passed tests
run: |
# Note: relies on PHPUnit execution to fail on test failure.
# Extract the number of executed tests from the log file.
if ! num_tests=$(grep -Eo 'OK \([0-9]+ tests' phpunit.log) ; then
if ! num_tests=$(grep -Eo 'Tests: [0-9]+, Assertions:' phpunit.log) ; then
echo "PHPUnit failed or did not run. Check the PHPUnit output in the previous step to debug." && exit 1
fi
fi
# Extract just the number of tests from the string.
num_tests=$(echo "$num_tests" | grep -Eo '[0-9]+')
if [ $num_tests -lt 500 ] ; then
echo "Only $num_tests tests passed, which is much fewer than expected." && exit 1
fi
echo "$num_tests tests passed."
phpcs:
name: PHP coding standards
Expand Down
10 changes: 8 additions & 2 deletions bin/api-docs/gen-block-lib-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,20 @@ function readBlockJSON( filename ) {
? processObjWithInnerKeys( augmentSupports( blockjson.supports ) )
: [];
const attributes = getTruthyKeys( blockjson.attributes );
const parent = blockjson.parent
? '\n' + `- **Parent:** ${ blockjson.parent.join( ', ' ) }`
: '';
const experimental = blockjson.__experimental
? '\n' + `- **Experimental:** ${ blockjson.__experimental }`
: '';

return `
## ${ blockjson.title }
${ blockjson.description } ([Source](${ sourcefile }))
- **Name:** ${ blockjson.name }
- **Category:** ${ blockjson.category }
- **Name:** ${ blockjson.name }${ experimental }
- **Category:** ${ blockjson.category }${ parent }
- **Supports:** ${ supportsList.sort().join( ', ' ) }
- **Attributes:** ${ attributes.sort().join( ', ' ) }
`;
Expand Down
1 change: 1 addition & 0 deletions bin/build-plugin-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ build_files=$(
build/block-library/blocks/*.php \
build/block-library/blocks/*/block.json \
build/block-library/blocks/*/*.{js,js.map,css,asset.php} \
build/block-library/interactivity/*.{js,js.map,asset.php} \
build/edit-widgets/blocks/*/block.json \
build/widgets/blocks/*.php \
build/widgets/blocks/*/block.json \
Expand Down
Loading

1 comment on commit e6eee8d

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in e6eee8d.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5073913074
📝 Reported issues:

Please sign in to comment.