Skip to content

Commit c9b7b21

Browse files
authored
Merge branch 'trunk' into 54915-rtl-inputs
2 parents da68b1b + 5e74d34 commit c9b7b21

File tree

2,773 files changed

+288973
-78868
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,773 files changed

+288973
-78868
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"username": "wordpress"
1212
},
1313
"ghcr.io/devcontainers/features/node:1": {
14-
"version": "14"
14+
"version": "20"
1515
},
1616
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
1717
"ghcr.io/devcontainers/features/git:1": {}

.env renamed to .env.example

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,15 @@ LOCAL_DB_TYPE=mysql
4646
##
4747
# The database version to use.
4848
#
49-
# Defaults to 5.7 with the assumption that LOCAL_DB_TYPE is set to `mysql` above.
49+
# Defaults to 8.0 with the assumption that LOCAL_DB_TYPE is set to `mysql` above.
5050
#
51-
# When using `mysql`, see https://hub.docker.com/r/amd64/mysql for valid versions.
52-
# When using `mariadb`, see https://hub.docker.com/r/amd64/mariadb for valid versions.
51+
# When using `mysql`, see https://hub.docker.com/_/mysql for valid versions.
52+
# When using `mariadb`, see https://hub.docker.com/_/mariadb for valid versions.
5353
##
54-
LOCAL_DB_VERSION=5.7
54+
LOCAL_DB_VERSION=8.4
55+
56+
# Whether or not to enable multisite.
57+
LOCAL_MULTISITE=false
5558

5659
# The debug settings to add to `wp-config.php`.
5760
LOCAL_WP_DEBUG=true
@@ -60,6 +63,7 @@ LOCAL_WP_DEBUG_DISPLAY=true
6063
LOCAL_SCRIPT_DEBUG=true
6164
LOCAL_WP_ENVIRONMENT_TYPE=local
6265
LOCAL_WP_DEVELOPMENT_MODE=core
66+
LOCAL_WP_TESTS_DOMAIN=example.org
6367

6468
# The URL to use when running e2e tests.
6569
WP_BASE_URL=http://localhost:${LOCAL_PORT}

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ updates:
88
schedule:
99
interval: "daily"
1010
open-pull-requests-limit: 10
11+
groups:
12+
github-actions:
13+
patterns:
14+
- "*"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Cleanup Pull Requests
2+
3+
on:
4+
push:
5+
branches:
6+
- trunk
7+
- '4.[1-9]'
8+
- '[5-9].[0-9]'
9+
10+
# Cancels all previous workflow runs for pull requests that have not completed.
11+
concurrency:
12+
# The concurrency group contains the workflow name and the branch name for pull requests
13+
# or the commit hash for any other events.
14+
group: ${{ github.workflow }}-${{ github.sha }}
15+
cancel-in-progress: true
16+
17+
# Disable permissions for all available scopes by default.
18+
# Any needed permissions should be configured at the job level.
19+
permissions: {}
20+
21+
jobs:
22+
# Runs pull request cleanup.
23+
close-prs:
24+
name: Clean up pull requests
25+
permissions:
26+
pull-requests: write
27+
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
28+
uses: ./.github/workflows/reusable-cleanup-pull-requests.yml

.github/workflows/coding-standards.yml

Lines changed: 10 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ on:
2929
- '.jshintrc'
3030
# This file configures PHPCS. Changes could affect the outcome.
3131
- 'phpcs.xml.dist'
32-
# Changes to workflow files should always verify all workflows are successful.
33-
- '.github/workflows/*.yml'
32+
# Confirm any changes to relevant workflow files.
33+
- '.github/workflows/coding-standards.yml'
34+
- '.github/workflows/reusable-coding-standards-*.yml'
3435
workflow_dispatch:
3536

3637
# Cancels all previous workflow runs for pull requests that have not completed.
@@ -45,129 +46,21 @@ concurrency:
4546
permissions: {}
4647

4748
jobs:
48-
# Runs PHP coding standards checks.
49-
#
50-
# Violations are reported inline with annotations.
51-
#
52-
# Performs the following steps:
53-
# - Checks out the repository.
54-
# - Sets up PHP.
55-
# - Configures caching for PHPCS scans.
56-
# - Installs Composer dependencies.
57-
# - Make Composer packages available globally.
58-
# - Runs PHPCS on the full codebase with warnings suppressed.
59-
# - Generate a report for displaying issues as pull request annotations.
60-
# - Runs PHPCS on the `tests` directory without warnings suppressed.
61-
# - Generate a report for displaying `test` directory issues as pull request annotations.
62-
# - Ensures version-controlled files are not modified or deleted.
49+
# Runs the PHP coding standards checks.
6350
phpcs:
6451
name: PHP coding standards
65-
runs-on: ubuntu-latest
52+
uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk
6653
permissions:
6754
contents: read
68-
timeout-minutes: 20
6955
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
7056

71-
steps:
72-
- name: Checkout repository
73-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
74-
75-
- name: Set up PHP
76-
uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0
77-
with:
78-
php-version: '7.4'
79-
coverage: none
80-
tools: cs2pr
81-
82-
# This date is used to ensure that the PHPCS cache is cleared at least once every week.
83-
# http://man7.org/linux/man-pages/man1/date.1.html
84-
- name: "Get last Monday's date"
85-
id: get-date
86-
run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
87-
88-
- name: Cache PHPCS scan cache
89-
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
90-
with:
91-
path: |
92-
.cache/phpcs-src.json
93-
.cache/phpcs-tests.json
94-
key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}
95-
96-
# Since Composer dependencies are installed using `composer update` and no lock file is in version control,
97-
# passing a custom cache suffix ensures that the cache is flushed at least once per week.
98-
- name: Install Composer dependencies
99-
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
100-
with:
101-
custom-cache-suffix: ${{ steps.get-date.outputs.date }}
102-
103-
- name: Make Composer packages available globally
104-
run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
105-
106-
- name: Run PHPCS on all Core files
107-
id: phpcs-core
108-
run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml
109-
110-
- name: Show PHPCS results in PR
111-
if: ${{ always() && steps.phpcs-core.outcome == 'failure' }}
112-
run: cs2pr ./.cache/phpcs-report.xml
113-
114-
- name: Check test suite files for warnings
115-
id: phpcs-tests
116-
run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml
117-
118-
- name: Show test suite scan results in PR
119-
if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }}
120-
run: cs2pr ./.cache/phpcs-tests-report.xml
121-
122-
- name: Ensure version-controlled files are not modified during the tests
123-
run: git diff --exit-code
124-
12557
# Runs the JavaScript coding standards checks.
126-
#
127-
# JSHint violations are not currently reported inline with annotations.
128-
#
129-
# Performs the following steps:
130-
# - Checks out the repository.
131-
# - Sets up Node.js.
132-
# - Logs debug information about the GitHub Action runner.
133-
# - Installs npm dependencies.
134-
# - Run the WordPress JSHint checks.
135-
# - Ensures version-controlled files are not modified or deleted.
13658
jshint:
13759
name: JavaScript coding standards
138-
runs-on: ubuntu-latest
60+
uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk
13961
permissions:
14062
contents: read
141-
timeout-minutes: 20
14263
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
143-
env:
144-
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
145-
146-
steps:
147-
- name: Checkout repository
148-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
149-
150-
- name: Set up Node.js
151-
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
152-
with:
153-
node-version-file: '.nvmrc'
154-
cache: npm
155-
156-
- name: Log debug information
157-
run: |
158-
npm --version
159-
node --version
160-
git --version
161-
svn --version
162-
163-
- name: Install npm Dependencies
164-
run: npm ci
165-
166-
- name: Run JSHint
167-
run: npm run grunt jshint
168-
169-
- name: Ensure version-controlled files are not modified or deleted
170-
run: git diff --exit-code
17164

17265
slack-notifications:
17366
name: Slack Notifications
@@ -178,7 +71,7 @@ jobs:
17871
needs: [ phpcs, jshint ]
17972
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
18073
with:
181-
calling_status: ${{ needs.phpcs.result == 'success' && needs.jshint.result == 'success' && 'success' || ( needs.phpcs.result == 'cancelled' || needs.jshint.result == 'cancelled' ) && 'cancelled' || 'failure' }}
74+
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
18275
secrets:
18376
SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
18477
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
@@ -197,13 +90,13 @@ jobs:
19790
github.event_name != 'pull_request' &&
19891
github.run_attempt < 2 &&
19992
(
200-
needs.phpcs.result == 'cancelled' || needs.phpcs.result == 'failure' ||
201-
needs.jshint.result == 'cancelled' || needs.jshint.result == 'failure'
93+
contains( needs.*.result, 'cancelled' ) ||
94+
contains( needs.*.result, 'failure' )
20295
)
20396
20497
steps:
20598
- name: Dispatch workflow run
206-
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
99+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
207100
with:
208101
retries: 2
209102
retry-exempt-status-codes: 418

.github/workflows/end-to-end-tests.yml

Lines changed: 9 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -32,100 +32,22 @@ permissions: {}
3232

3333
env:
3434
LOCAL_DIR: build
35+
PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
3536

3637
jobs:
3738
# Runs the end-to-end test suite.
38-
#
39-
# Performs the following steps:
40-
# - Sets environment variables.
41-
# - Checks out the repository.
42-
# - Sets up Node.js.
43-
# - Logs debug information about the GitHub Action runner.
44-
# - Installs npm dependencies.
45-
# - Builds WordPress to run from the `build` directory.
46-
# - Starts the WordPress Docker container.
47-
# - Logs the running Docker containers.
48-
# - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).
49-
# - Install WordPress within the Docker container.
50-
# - Run the E2E tests.
51-
# - Ensures version-controlled files are not modified or deleted.
5239
e2e-tests:
53-
name: E2E Tests with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}
54-
runs-on: ubuntu-latest
40+
name: Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}
41+
uses: WordPress/wordpress-develop/.github/workflows/reusable-end-to-end-tests.yml@trunk
5542
permissions:
5643
contents: read
57-
timeout-minutes: 20
5844
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
5945
strategy:
6046
fail-fast: false
6147
matrix:
6248
LOCAL_SCRIPT_DEBUG: [ true, false ]
63-
64-
steps:
65-
- name: Configure environment variables
66-
run: |
67-
echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
68-
echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
69-
70-
- name: Checkout repository
71-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
72-
73-
- name: Set up Node.js
74-
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
75-
with:
76-
node-version-file: '.nvmrc'
77-
cache: npm
78-
79-
- name: Log debug information
80-
run: |
81-
npm --version
82-
node --version
83-
curl --version
84-
git --version
85-
svn --version
86-
locale -a
87-
88-
- name: Install npm Dependencies
89-
run: npm ci
90-
91-
- name: Build WordPress
92-
run: npm run build
93-
94-
- name: Start Docker environment
95-
run: |
96-
npm run env:start
97-
98-
- name: Log running Docker containers
99-
run: docker ps -a
100-
101-
- name: Docker debug information
102-
run: |
103-
docker -v
104-
docker-compose -v
105-
docker-compose run --rm mysql mysql --version
106-
docker-compose run --rm php php --version
107-
docker-compose run --rm php php -m
108-
docker-compose run --rm php php -i
109-
docker-compose run --rm php locale -a
110-
111-
- name: Install WordPress
112-
env:
113-
LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }}
114-
run: npm run env:install
115-
116-
- name: Run E2E tests
117-
run: npm run test:e2e
118-
119-
- name: Archive debug artifacts (screenshots, HTML snapshots)
120-
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
121-
if: always()
122-
with:
123-
name: failures-artifacts
124-
path: artifacts
125-
if-no-files-found: ignore
126-
127-
- name: Ensure version-controlled files are not modified or deleted
128-
run: git diff --exit-code
49+
with:
50+
LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }}
12951

13052
slack-notifications:
13153
name: Slack Notifications
@@ -136,7 +58,7 @@ jobs:
13658
needs: [ e2e-tests ]
13759
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
13860
with:
139-
calling_status: ${{ needs.e2e-tests.result == 'success' && 'success' || needs.e2e-tests.result == 'cancelled' && 'cancelled' || 'failure' }}
61+
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
14062
secrets:
14163
SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
14264
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
@@ -155,12 +77,12 @@ jobs:
15577
github.event_name != 'pull_request' &&
15678
github.run_attempt < 2 &&
15779
(
158-
needs.e2e-tests.result == 'cancelled' || needs.e2e-tests.result == 'failure'
80+
contains( needs.*.result, 'cancelled' ) ||
81+
contains( needs.*.result, 'failure' )
15982
)
160-
16183
steps:
16284
- name: Dispatch workflow run
163-
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
85+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
16486
with:
16587
retries: 2
16688
retry-exempt-status-codes: 418

.github/workflows/failed-workflow.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626
runs-on: ubuntu-latest
2727
permissions:
2828
actions: write
29-
timeout-minutes: 5
29+
timeout-minutes: 30
3030

3131
steps:
3232
- name: Rerun a workflow
33-
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
33+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
3434
with:
35-
retries: 2
35+
retries: 15
3636
retry-exempt-status-codes: 418
3737
script: |
3838
const workflow_run = await github.rest.actions.getWorkflowRun({

0 commit comments

Comments
 (0)