Skip to content

Commit

Permalink
Merge branch 'WordPress:trunk' into trac-22225/date-i18n-day-number-o…
Browse files Browse the repository at this point in the history
…rdinals
  • Loading branch information
jayaddison authored Feb 4, 2025
2 parents beb1a61 + 7d10dd7 commit 51b4b06
Show file tree
Hide file tree
Showing 288 changed files with 16,927 additions and 7,080 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ LOCAL_DB_TYPE=mysql
# When using `mysql`, see https://hub.docker.com/_/mysql for valid versions.
# When using `mariadb`, see https://hub.docker.com/_/mariadb for valid versions.
##
LOCAL_DB_VERSION=8.0
LOCAL_DB_VERSION=8.4

# Whether or not to enable multisite.
LOCAL_MULTISITE=false
Expand Down
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,20 @@ updates:
github-actions:
patterns:
- "*"

# Check for updates to Composer packages.
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10
ignore:
# These dependencies do not currently need to be managed with Dependabot.
- dependency-name: "squizlabs/php_codesniffer"
- dependency-name: "wp-coding-standards/wpcs"
- dependency-name: "phpcompatibility/php-compatibility"
- dependency-name: "yoast/phpunit-polyfills"
groups:
composer-packages:
patterns:
- "composer/ca-bundle"
28 changes: 28 additions & 0 deletions .github/workflows/cleanup-pull-requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Cleanup Pull Requests

on:
push:
branches:
- trunk
- '4.[1-9]'
- '[5-9].[0-9]'

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true

# Disable permissions for all available scopes by default.
# Any needed permissions should be configured at the job level.
permissions: {}

jobs:
# Runs pull request cleanup.
close-prs:
name: Clean up pull requests
permissions:
pull-requests: write
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
uses: ./.github/workflows/reusable-cleanup-pull-requests.yml
10 changes: 5 additions & 5 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ jobs:
# Runs the PHP coding standards checks.
phpcs:
name: PHP coding standards
uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk
uses: ./.github/workflows/reusable-coding-standards-php.yml
permissions:
contents: read
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}

# Runs the JavaScript coding standards checks.
jshint:
name: JavaScript coding standards
uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk
uses: ./.github/workflows/reusable-coding-standards-javascript.yml
permissions:
contents: read
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}

slack-notifications:
name: Slack Notifications
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
uses: ./.github/workflows/slack-notifications.yml
permissions:
actions: read
contents: read
Expand All @@ -80,7 +80,7 @@ jobs:

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ phpcs, jshint, slack-notifications ]
Expand All @@ -107,6 +107,6 @@ jobs:
workflow_id: 'failed-workflow.yml',
ref: 'trunk',
inputs: {
run_id: '${{ github.run_id }}'
run_id: `${context.runId}`,
}
});
25 changes: 21 additions & 4 deletions .github/workflows/end-to-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ on:
- trunk
- '5.[3-9]'
- '[6-9].[0-9]'
paths:
# Any change to a PHP, CSS, or JavaScript file should run checks.
- '**.css'
- '**.js'
- '**.php'
# These files configure npm and the task runner. Changes could affect the outcome.
- 'package*.json'
- 'Gruntfile.js'
- 'webpack.config.js'
- 'tools/webpack/**'
# These files configure Composer. Changes could affect the outcome.
- 'composer.*'
# This files affect the e2e tests. Changes could affect the outcome.
- 'tests/e2e/**'
# Confirm any changes to relevant workflow files.
- '.github/workflows/end-to-end-tests.yml'
- '.github/workflows/reusable-end-to-end-tests-*.yml'
workflow_dispatch:

# Cancels all previous workflow runs for pull requests that have not completed.
Expand All @@ -38,7 +55,7 @@ jobs:
# Runs the end-to-end test suite.
e2e-tests:
name: Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}
uses: WordPress/wordpress-develop/.github/workflows/reusable-end-to-end-tests.yml@trunk
uses: ./.github/workflows/reusable-end-to-end-tests.yml
permissions:
contents: read
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
Expand All @@ -51,7 +68,7 @@ jobs:

slack-notifications:
name: Slack Notifications
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
uses: ./.github/workflows/slack-notifications.yml
permissions:
actions: read
contents: read
Expand All @@ -67,7 +84,7 @@ jobs:

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ e2e-tests, slack-notifications ]
Expand All @@ -93,6 +110,6 @@ jobs:
workflow_id: 'failed-workflow.yml',
ref: 'trunk',
inputs: {
run_id: '${{ github.run_id }}'
run_id: `${context.runId}`,
}
});
8 changes: 5 additions & 3 deletions .github/workflows/failed-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# - Restarts all failed jobs when the workflow fails or is cancelled for the first time.
failed-workflow:
name: Rerun a workflow
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
timeout-minutes: 30
Expand All @@ -38,7 +38,7 @@ jobs:
const workflow_run = await github.rest.actions.getWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ inputs.run_id }},
run_id: process.env.RUN_ID,
});
// Only rerun after the first run attempt.
Expand All @@ -49,6 +49,8 @@ jobs:
const rerun = await github.rest.actions.reRunWorkflowFailedJobs({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ inputs.run_id }},
run_id: process.env.RUN_ID,
enable_debug_logging: true
});
env:
RUN_ID: ${{ inputs.run_id }}
34 changes: 22 additions & 12 deletions .github/workflows/install-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
# Determines the supported values for PHP and database versions based on the WordPress version being tested.
build-test-matrix:
name: Build Test Matrix
uses: WordPress/wordpress-develop/.github/workflows/reusable-support-json-reader-v1.yml@trunk
uses: ./.github/workflows/reusable-support-json-reader-v1.yml
permissions:
contents: read
secrets: inherit
Expand All @@ -69,7 +69,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
php: ${{ fromJSON( needs.build-test-matrix.outputs.php-versions ) }}
db-type: [ 'mysql' ]
db-version: ${{ fromJSON( needs.build-test-matrix.outputs.mysql-versions ) }}
Expand All @@ -78,19 +78,25 @@ jobs:

# Exclude some PHP and MySQL versions that cannot currently be tested with Docker containers.
exclude:
# There are no local WordPress Docker environment containers for PHP <= 5.3.
- php: '5.2'
- php: '5.3'
# MySQL containers <= 5.5 do not exist or fail to start properly.
- db-version: '5.0'
- db-version: '5.1'
- db-version: '5.5'
# The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
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 All @@ -109,24 +115,28 @@ jobs:
steps:
- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
with:
php-version: '${{ matrix.php }}'
coverage: none
tools: wp-cli${{ contains( fromJSON('["5.4", "5.5"]'), matrix.php ) && ':2.4.0' || '' }}
tools: ${{ contains( fromJSON('["5.4", "5.5"]'), matrix.php ) && 'wp-cli:2.4.0' || 'wp-cli' }}

- name: Download WordPress
run: wp core download ${{ inputs.wp-version && format( '--version={0}', inputs.wp-version ) || '--version=nightly' }}
run: wp core download --version="${WP_VERSION}"
env:
WP_VERSION: ${{ inputs.wp-version || 'nightly' }}

- name: Create wp-config.php file
run: wp config create --dbname=test_db --dbuser=root --dbpass=root --dbhost=127.0.0.1:${{ job.services.database.ports['3306'] }}
run: wp config create --dbname=test_db --dbuser=root --dbpass=root --dbhost="127.0.0.1:${DB_PORT}"
env:
DB_PORT: ${{ job.services.database.ports['3306'] }}

- name: Install WordPress
run: wp core ${{ matrix.multisite && 'multisite-' || '' }}install --url=http://localhost/ --title="Upgrade Test" --admin_user=admin --admin_password=password [email protected] --skip-email
run: wp core ${{ matrix.multisite && 'multisite-install' || 'install' }} --url=http://localhost/ --title="Upgrade Test" --admin_user=admin --admin_password=password [email protected] --skip-email

slack-notifications:
name: Slack Notifications
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
uses: ./.github/workflows/slack-notifications.yml
permissions:
actions: read
contents: read
Expand All @@ -142,7 +152,7 @@ jobs:

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]
Expand All @@ -169,6 +179,6 @@ jobs:
workflow_id: 'failed-workflow.yml',
ref: 'trunk',
inputs: {
run_id: '${{ github.run_id }}'
run_id: `${context.runId}`,
}
});
13 changes: 8 additions & 5 deletions .github/workflows/javascript-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ on:
paths:
# Any change to a JavaScript file should run tests.
- '**.js'
# These files configure npm. Changes could affect the outcome.
# These files configure npm and the task runner. Changes could affect the outcome.
- 'package*.json'
- 'Gruntfile.js'
- 'webpack.config.js'
- 'tools/webpack/**'
# This file configures ESLint. Changes could affect the outcome.
- '.eslintignore'
# This file configures JSHint. Changes could affect the outcome.
Expand All @@ -47,14 +50,14 @@ jobs:
# Runs the WordPress Core JavaScript tests.
test-js:
name: QUnit Tests
uses: WordPress/wordpress-develop/.github/workflows/reusable-javascript-tests.yml@trunk
uses: ./.github/workflows/reusable-javascript-tests.yml
permissions:
contents: read
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}

slack-notifications:
name: Slack Notifications
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
uses: ./.github/workflows/slack-notifications.yml
permissions:
actions: read
contents: read
Expand All @@ -70,7 +73,7 @@ jobs:

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]
Expand All @@ -97,6 +100,6 @@ jobs:
workflow_id: 'failed-workflow.yml',
ref: 'trunk',
inputs: {
run_id: '${{ github.run_id }}'
run_id: `${context.runId}`,
}
});
Loading

0 comments on commit 51b4b06

Please sign in to comment.