Skip to content

Commit

Permalink
Merge branch 'WordPress:trunk' into fix/62046-test-approach
Browse files Browse the repository at this point in the history
  • Loading branch information
mukeshpanchal27 authored Jan 16, 2025
2 parents dcb4c4a + 5b01d24 commit 859231e
Show file tree
Hide file tree
Showing 61 changed files with 2,069 additions and 343 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/install-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ jobs:
db-version: '8.4'
- php: '7.3'
db-version: '8.4'
# Only test the latest innovation release.
- db-version: '9.0'
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.0'
db-version: '9.1'
- php: '7.3'
db-version: '9.0'
db-version: '9.1'

services:
database:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/local-docker-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ jobs:
exclude:
# MySQL containers <= 5.5 do not exist or fail to start properly.
- db-version: '5.5'
# Only test the latest innovation release.
- db-version: '9.0'
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.0'
db-version: '9.1'
- php: '7.3'
db-version: '9.0'
db-version: '9.1'

with:
os: ${{ matrix.os }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ permissions: {}
jobs:
# Runs the performance test suite.
performance:
name: Performance tests ${{ matrix.memcached && '(with memcached)' || '' }}
name: ${{ matrix.multisite && 'Multisite' || 'Single site' }}
uses: WordPress/wordpress-develop/.github/workflows/reusable-performance.yml@trunk
permissions:
contents: read
Expand All @@ -41,8 +41,10 @@ jobs:
fail-fast: false
matrix:
memcached: [ true, false ]
multisite: [ true, false ]
with:
memcached: ${{ matrix.memcached }}
multisite: ${{ matrix.multisite }}
secrets:
CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }}

Expand Down
67 changes: 54 additions & 13 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
os: [ ubuntu-latest ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.4', '9.0' ]
db-version: [ '5.7', '8.0', '8.4' ]
tests-domain: [ 'example.org' ]
multisite: [ false, true ]
memcached: [ false ]
Expand Down Expand Up @@ -91,14 +91,6 @@ jobs:
multisite: false
memcached: false
report: true

exclude:
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.0'
- php: '7.3'
db-version: '9.0'

with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
Expand Down Expand Up @@ -126,7 +118,7 @@ jobs:
os: [ ubuntu-latest ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mariadb' ]
db-version: [ '10.4', '10.6', '10.11', '11.2' ]
db-version: [ '5.5', '10.3', '10.4', '10.5', '10.6', '10.11', '11.4' ]
multisite: [ false, true ]
memcached: [ false ]

Expand All @@ -135,13 +127,13 @@ jobs:
- os: ubuntu-latest
php: '8.3'
db-type: 'mariadb'
db-version: '11.2'
db-version: '11.4'
multisite: false
memcached: true
- os: ubuntu-latest
php: '8.3'
db-type: 'mariadb'
db-version: '11.2'
db-version: '11.4'
multisite: true
memcached: true
with:
Expand All @@ -154,6 +146,55 @@ jobs:
phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
report: ${{ matrix.report || false }}

#
# Creates PHPUnit test jobs to test MariaDB and MySQL innovation releases.
#
# Though innovation releases are deemed "production grade" and never receive LTS status, they include new features
# and updates that will be included in the next LTS version.
#
# Because upstream support for innovation releases gets dropped when a new one is released, only the most recent
# innovation version is tested.
#
test-innovation-releases:
name: PHP ${{ matrix.php }}
uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk
permissions:
contents: read
secrets: inherit
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql', 'mariadb' ]
db-version: [ '9.1', '11.6' ]
multisite: [ false, true ]
memcached: [ false ]
db-innovation: [ true ]

exclude:
# MySQL 9.0+ will not work on PHP <= 7.3 because mysql_native_password was removed. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.1'
- php: '7.3'
db-version: '9.1'
# Exclude version combinations that don't exist.
- db-type: 'mariadb'
db-version: '9.1'
- db-type: 'mysql'
db-version: '11.6'
with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
db-type: ${{ matrix.db-type }}
db-version: ${{ matrix.db-version }}
db-innovation: ${{ matrix.db-innovation }}
multisite: ${{ matrix.multisite }}
memcached: ${{ matrix.memcached }}
phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
report: ${{ matrix.report || false }}

#
# Runs specific individual test groups.
#
Expand Down Expand Up @@ -183,7 +224,7 @@ jobs:
permissions:
actions: read
contents: read
needs: [ test-with-mysql, test-with-mariadb, specific-test-groups ]
needs: [ test-with-mysql, test-with-mariadb, test-innovation-releases, specific-test-groups ]
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
with:
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
Expand Down
38 changes: 24 additions & 14 deletions .github/workflows/reusable-performance.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
# A reusable workflow that runs the performance test suite.
##
name: Performance Tests
name: Run performance Tests

on:
workflow_call:
Expand All @@ -26,6 +26,11 @@ on:
required: false
type: 'boolean'
default: false
multisite:
description: 'Whether to use Multisite.'
required: false
type: 'boolean'
default: false
secrets:
CODEVITALS_PROJECT_TOKEN:
description: 'The authorization token for https://www.codevitals.run/project/wordpress.'
Expand Down Expand Up @@ -53,6 +58,7 @@ env:

LOCAL_PHP_MEMCACHED: ${{ inputs.memcached }}
LOCAL_PHP: ${{ inputs.php-version }}${{ 'latest' != inputs.php-version && '-fpm' || '' }}
LOCAL_MULTISITE: ${{ inputs.multisite }}

jobs:
# Performs the following steps:
Expand All @@ -65,9 +71,11 @@ jobs:
# - Install Playwright browsers.
# - Build WordPress.
# - Start Docker environment.
# - Install object cache drop-in.
# - Log running Docker containers.
# - Docker debug information.
# - Install WordPress.
# - Enable themes on Multisite.
# - Install WordPress Importer plugin.
# - Import mock data.
# - Deactivate WordPress Importer plugin.
Expand Down Expand Up @@ -98,7 +106,7 @@ jobs:
# - Publish performance results.
# - Ensure version-controlled files are not modified or deleted.
performance:
name: Run tests
name: ${{ inputs.multisite && 'Multisite' || 'Single site' }} / ${{ inputs.memcached && 'Memcached' || 'Default' }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -166,6 +174,14 @@ jobs:
- name: Install WordPress
run: npm run env:install

- name: Enable themes on Multisite
if: ${{ inputs.multisite }}
run: |
npm run env:cli -- theme enable twentytwentyone --network --path=/var/www/${{ env.LOCAL_DIR }}
npm run env:cli -- theme enable twentytwentythree --network --path=/var/www/${{ env.LOCAL_DIR }}
npm run env:cli -- theme enable twentytwentyfour --network --path=/var/www/${{ env.LOCAL_DIR }}
npm run env:cli -- theme enable twentytwentyfive --network --path=/var/www/${{ env.LOCAL_DIR }}
- name: Install WordPress Importer plugin
run: npm run env:cli -- plugin install wordpress-importer --activate --path=/var/www/${{ env.LOCAL_DIR }}

Expand Down Expand Up @@ -290,7 +306,7 @@ jobs:
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: always()
with:
name: performance-artifacts${{ inputs.memcached && '-memcached' || '' }}-${{ github.run_id }}
name: performance-artifacts${{ inputs.multisite && '-multisite' || '' }}${{ inputs.memcached && '-memcached' || '' }}-${{ github.run_id }}
path: artifacts
if-no-files-found: ignore
include-hidden-files: true
Expand All @@ -303,7 +319,7 @@ jobs:

- name: Set the base sha
# Only needed when publishing results.
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached && ! inputs.multisite }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
id: base-sha
with:
Expand All @@ -314,21 +330,15 @@ jobs:
- name: Set commit details
# Only needed when publishing results.
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
id: commit-timestamp
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const commit_details = await github.rest.git.getCommit({ owner: context.repo.owner, repo: context.repo.repo, commit_sha: context.sha });
return parseInt((new Date( commit_details.data.author.date ).getTime() / 1000).toFixed(0))
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached && ! inputs.multisite }}
# Write to an environment variable to have the output available in later steps of the job.
run: echo "COMMITTED_AT=$(git show -s $GITHUB_SHA --format='%cI')" >> $GITHUB_ENV

- name: Publish performance results
# Only publish results on pushes to trunk.
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached && ! inputs.multisite }}
env:
BASE_SHA: ${{ steps.base-sha.outputs.result }}
COMMITTED_AT: ${{ steps.commit-timestamp.outputs.result }}
CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }}
HOST_NAME: "www.codevitals.run"
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/reusable-phpunit-tests-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ on:
required: false
type: 'string'
default: '8.4'
db-innovation:
description: 'Whether a database software innovation release is being tested.'
required: false
type: 'boolean'
default: false
multisite:
description: 'Whether to run tests as multisite'
required: false
Expand Down Expand Up @@ -105,7 +110,7 @@ jobs:
# - Checks out the WordPress Test reporter repository.
# - Submit the test results to the WordPress.org host test results.
phpunit-tests:
name: ${{ inputs.phpunit-test-groups && format( '{0} / ', inputs.phpunit-test-groups ) || '' }}PHP ${{ inputs.php }} ${{ ! inputs.phpunit-test-groups && ! inputs.coverage-report && '/ ' || 'with ' }}${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
name: ${{ inputs.phpunit-test-groups && format( '{0} / ', inputs.phpunit-test-groups ) || '' }}PHP ${{ inputs.php }} ${{ ! inputs.phpunit-test-groups && ! inputs.coverage-report && '/ ' || 'with ' }}${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.db-innovation && ' (innovation release)' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
runs-on: ${{ inputs.os }}
timeout-minutes: ${{ inputs.coverage-report && 120 || 20 }}

Expand Down
1 change: 1 addition & 0 deletions .version-support-mysql.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"6-8": [
"9.1",
"9.0",
"8.4",
"8.0",
Expand Down
5 changes: 5 additions & 0 deletions src/wp-admin/css/about.css
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,12 @@
}

.about__section a.button.button-hero {
padding-top: 1.1875rem;
padding-bottom: 1.1875rem;
font-size: 1.5rem;
line-height: 1.4;
white-space: normal;
text-wrap: pretty;
}

.about__container ul {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/network/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@
<tr>
<th scope="row"><?php _e( 'Site upload space' ); ?></th>
<td>
<label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( (bool) get_site_option( 'upload_space_check_disabled' ), false ); ?>/>
<label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( (bool) get_site_option( 'upload_space_check_disabled' ), false ); ?> />
<?php
printf(
/* translators: %s: Number of megabytes to limit uploads to. */
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/options-discussion.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<ul>
<li>
<label for="close_comments_days_old"><?php _e( 'Close comments when post is how many days old' ); ?></label>
<input name="close_comments_days_old" type="number" step="1" min="0" id="close_comments_days_old" value="<?php echo esc_attr( get_option( 'close_comments_days_old' ) ); ?>" class="small-text"/>
<input name="close_comments_days_old" type="number" step="1" min="0" id="close_comments_days_old" value="<?php echo esc_attr( get_option( 'close_comments_days_old' ) ); ?>" class="small-text" />
</li>
</ul>

Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/options-media.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<label for="thumbnail_size_h"><?php _e( 'Height' ); ?></label>
<input name="thumbnail_size_h" type="number" step="1" min="0" id="thumbnail_size_h" value="<?php form_option( 'thumbnail_size_h' ); ?>" class="small-text" />
</fieldset>
<input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked( '1', get_option( 'thumbnail_crop' ) ); ?>/>
<input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1"<?php checked( '1', get_option( 'thumbnail_crop' ) ); ?> />
<label for="thumbnail_crop"><?php _e( 'Crop thumbnail to exact dimensions (normally thumbnails are proportional)' ); ?></label>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/setup-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function setup_config_display_header( $body_classes = array() ) {
<table class="form-table" role="presentation">
<tr>
<th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th>
<td><input name="dbname" id="dbname" type="text" aria-describedby="dbname-desc" size="25" placeholder="wordpress"<?php echo $autofocus; ?>/>
<td><input name="dbname" id="dbname" type="text" aria-describedby="dbname-desc" size="25" placeholder="wordpress"<?php echo $autofocus; ?> />
<p id="dbname-desc"><?php _e( 'The name of the database you want to use with WordPress.' ); ?></p></td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@ hr.wp-block-separator.is-style-dots::before {

.editor-styles-wrapper .wp-block-quote p {
color: inherit;
font-weight: 400;
margin: 0 0 20px 0;
letter-spacing: inherit;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@ hr.wp-block-separator.is-style-dots::before {

.editor-styles-wrapper .wp-block-quote p {
color: inherit;
font-weight: 400;
margin: 0 0 20px 0;
letter-spacing: inherit;
}
Expand Down
Loading

0 comments on commit 859231e

Please sign in to comment.