Skip to content

Commit 207e6b9

Browse files
committed
Merge branch 'trunk' into hello-dolly
2 parents 549d1ac + 238383d commit 207e6b9

2,130 files changed

Lines changed: 214461 additions & 43509 deletions

File tree

Some content is hidden

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

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"name": "WordPress Core Development",
44
"dockerComposeFile": "docker-compose.yml",
55
"service": "app",
6-
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
6+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
77

88
// Features to add to the dev container. More info: https://containers.dev/features.
99
"features": {
1010
"ghcr.io/devcontainers/features/common-utils:2": {
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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,20 @@ 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.0
5555

5656
# The debug settings to add to `wp-config.php`.
5757
LOCAL_WP_DEBUG=true
5858
LOCAL_WP_DEBUG_LOG=true
5959
LOCAL_WP_DEBUG_DISPLAY=true
6060
LOCAL_SCRIPT_DEBUG=true
6161
LOCAL_WP_ENVIRONMENT_TYPE=local
62+
LOCAL_WP_DEVELOPMENT_MODE=core
6263

6364
# The URL to use when running e2e tests.
6465
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: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
##
2+
# A callable workflow that tests the WordPress Core build process.
3+
##
4+
name: Test the WordPress Build Process
5+
6+
on:
7+
workflow_call:
8+
inputs:
9+
os:
10+
description: 'Operating system to run tests on'
11+
required: false
12+
type: 'string'
13+
default: 'ubuntu-latest'
14+
directory:
15+
description: 'Directory to run WordPress from. Valid values are `src` or `build`'
16+
required: false
17+
type: 'string'
18+
default: 'src'
19+
20+
env:
21+
PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
22+
23+
jobs:
24+
# Verifies that installing npm dependencies and building WordPress works as expected.
25+
#
26+
# Performs the following steps:
27+
# - Checks out the repository.
28+
# - Sets up Node.js.
29+
# - Logs debug information about the GitHub Action runner.
30+
# - Installs npm dependencies.
31+
# - Builds WordPress to run from the desired location (src or build).
32+
# - Ensures version-controlled files are not modified or deleted.
33+
# - Creates a ZIP of the built WordPress files (when building to the build directory).
34+
# - Cleans up after building WordPress.
35+
# - Ensures version-controlled files are not modified or deleted.
36+
# - Uploads the ZIP as a GitHub Actions artifact (when building to the build directory).
37+
build-process-tests:
38+
name: Core running from ${{ inputs.directory }} / ${{ inputs.os == 'macos-latest' && 'MacOS' || inputs.os == 'windows-latest' && 'Windows' || 'Linux' }}
39+
runs-on: ${{ inputs.os }}
40+
timeout-minutes: 20
41+
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
45+
with:
46+
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
47+
48+
- name: Set up Node.js
49+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
50+
with:
51+
node-version-file: '.nvmrc'
52+
check-latest: true
53+
cache: npm
54+
55+
- name: Log debug information
56+
run: |
57+
npm --version
58+
node --version
59+
curl --version
60+
git --version
61+
62+
- name: Install npm Dependencies
63+
run: npm ci
64+
65+
- name: Build WordPress to run from ${{ inputs.directory }}
66+
run: npm run build${{ inputs.directory == 'src' && ':dev' || '' }}
67+
68+
- name: Ensure version-controlled files are not modified or deleted during building
69+
run: git diff --exit-code
70+
71+
- name: Create ZIP of built files
72+
if: ${{ inputs.directory == 'build' && 'ubuntu-latest' == inputs.os }}
73+
run: zip -r wordpress.zip build/.
74+
75+
- name: Clean after building to run from ${{ inputs.directory }}
76+
run: npm run grunt clean${{ inputs.directory == 'src' && ' -- --dev' || '' }}
77+
78+
- name: Ensure version-controlled files are not modified or deleted during cleaning
79+
run: git diff --exit-code
80+
81+
- name: Upload ZIP as a GitHub Actions artifact
82+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
83+
if: ${{ inputs.directory == 'build' && 'ubuntu-latest' == inputs.os }}
84+
with:
85+
name: wordpress-build-${{ github.event_name == 'pull_request' && github.event.number || github.sha }}
86+
path: wordpress.zip
87+
if-no-files-found: error
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
##
2+
# A callable workflow that tests the Gutenberg plugin build process when run within a wordpress-develop checkout.
3+
##
4+
name: Test the Gutenberg plugin Build Process
5+
6+
on:
7+
workflow_call:
8+
inputs:
9+
os:
10+
description: 'Operating system to run tests on'
11+
required: false
12+
type: 'string'
13+
default: 'ubuntu-latest'
14+
directory:
15+
description: 'Directory to run WordPress from. Valid values are `src` or `build`'
16+
required: false
17+
type: 'string'
18+
default: 'src'
19+
20+
env:
21+
GUTENBERG_DIRECTORY: ${{ inputs.directory == 'build' && 'build' || 'src' }}/wp-content/plugins/gutenberg
22+
PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
23+
NODE_OPTIONS: '--max-old-space-size=8192'
24+
25+
jobs:
26+
# Verifies that installing npm dependencies and building the Gutenberg plugin works as expected.
27+
#
28+
# Performs the following steps:
29+
# - Checks out the repository.
30+
# - Checks out the Gutenberg plugin into the plugins directory.
31+
# - Sets up Node.js.
32+
# - Logs debug information about the GitHub Action runner.
33+
# - Installs Core npm dependencies.
34+
# - Installs Gutenberg npm dependencies.
35+
# - Runs the Gutenberg build process.
36+
# - Builds WordPress to run from the relevant location (src or build).
37+
# - Builds Gutenberg.
38+
# - Ensures version-controlled files are not modified or deleted.
39+
build-process-tests:
40+
name: Gutenberg running from ${{ inputs.directory }} / ${{ inputs.os == 'macos-latest' && 'MacOS' || inputs.os == 'windows-latest' && 'Windows' || 'Linux' }}
41+
runs-on: ${{ inputs.os }}
42+
timeout-minutes: 30
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
47+
with:
48+
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
49+
50+
- name: Checkout Gutenberg plugin
51+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
52+
with:
53+
repository: 'WordPress/gutenberg'
54+
path: ${{ env.GUTENBERG_DIRECTORY }}
55+
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
56+
57+
- name: Set up Node.js
58+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
59+
with:
60+
node-version-file: '.nvmrc'
61+
check-latest: true
62+
cache: npm
63+
cache-dependency-path: |
64+
package-lock.json
65+
${{ env.GUTENBERG_DIRECTORY }}/package-lock.json
66+
67+
- name: Log debug information
68+
run: |
69+
npm --version
70+
node --version
71+
curl --version
72+
git --version
73+
74+
- name: Install Core Dependencies
75+
run: npm ci
76+
77+
- name: Install Gutenberg Dependencies
78+
run: npm ci
79+
working-directory: ${{ env.GUTENBERG_DIRECTORY }}
80+
81+
- name: Build Gutenberg
82+
run: npm run build
83+
working-directory: ${{ env.GUTENBERG_DIRECTORY }}
84+
85+
- name: Build WordPress to run from ${{ inputs.directory }}
86+
run: npm run build${{ inputs.directory == 'src' && ':dev' || '' }}
87+
88+
- name: Run Gutenberg build script after building Core to run from ${{ inputs.directory }}
89+
run: npm run build
90+
working-directory: ${{ env.GUTENBERG_DIRECTORY }}
91+
92+
- name: Ensure version-controlled files are not modified or deleted during building
93+
run: git diff --exit-code

.github/workflows/coding-standards.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ concurrency:
4040
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
4141
cancel-in-progress: true
4242

43+
# Disable permissions for all available scopes by default.
44+
# Any needed permissions should be configured at the job level.
45+
permissions: {}
46+
4347
jobs:
4448
# Runs PHP coding standards checks.
4549
#
@@ -59,17 +63,21 @@ jobs:
5963
phpcs:
6064
name: PHP coding standards
6165
runs-on: ubuntu-latest
66+
permissions:
67+
contents: read
6268
timeout-minutes: 20
6369
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
6470

6571
steps:
6672
- name: Checkout repository
67-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
73+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
74+
with:
75+
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
6876

6977
- name: Set up PHP
70-
uses: shivammathur/setup-php@8e2ac35f639d3e794c1da1f28999385ab6fdf0fc # v2.23.0
78+
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2.29.0
7179
with:
72-
php-version: '7.4'
80+
php-version: 'latest'
7381
coverage: none
7482
tools: cs2pr
7583

@@ -80,7 +88,7 @@ jobs:
8088
run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
8189

8290
- name: Cache PHPCS scan cache
83-
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3.2.3
91+
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
8492
with:
8593
path: |
8694
.cache/phpcs-src.json
@@ -130,17 +138,21 @@ jobs:
130138
jshint:
131139
name: JavaScript coding standards
132140
runs-on: ubuntu-latest
141+
permissions:
142+
contents: read
133143
timeout-minutes: 20
134144
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
135145
env:
136-
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
146+
PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
137147

138148
steps:
139149
- name: Checkout repository
140-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
150+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
151+
with:
152+
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
141153

142154
- name: Set up Node.js
143-
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
155+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
144156
with:
145157
node-version-file: '.nvmrc'
146158
cache: npm
@@ -150,7 +162,6 @@ jobs:
150162
npm --version
151163
node --version
152164
git --version
153-
svn --version
154165
155166
- name: Install npm Dependencies
156167
run: npm ci
@@ -164,10 +175,13 @@ jobs:
164175
slack-notifications:
165176
name: Slack Notifications
166177
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
178+
permissions:
179+
actions: read
180+
contents: read
167181
needs: [ phpcs, jshint ]
168182
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
169183
with:
170-
calling_status: ${{ needs.phpcs.result == 'success' && needs.jshint.result == 'success' && 'success' || ( needs.phpcs.result == 'cancelled' || needs.jshint.result == 'cancelled' ) && 'cancelled' || 'failure' }}
184+
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
171185
secrets:
172186
SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
173187
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
@@ -177,20 +191,22 @@ jobs:
177191
failed-workflow:
178192
name: Failed workflow tasks
179193
runs-on: ubuntu-latest
194+
permissions:
195+
actions: write
180196
needs: [ phpcs, jshint, slack-notifications ]
181197
if: |
182198
always() &&
183199
github.repository == 'WordPress/wordpress-develop' &&
184200
github.event_name != 'pull_request' &&
185201
github.run_attempt < 2 &&
186202
(
187-
needs.phpcs.result == 'cancelled' || needs.phpcs.result == 'failure' ||
188-
needs.jshint.result == 'cancelled' || needs.jshint.result == 'failure'
203+
contains( needs.*.result, 'cancelled' ) ||
204+
contains( needs.*.result, 'failure' )
189205
)
190206
191207
steps:
192208
- name: Dispatch workflow run
193-
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
209+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
194210
with:
195211
retries: 2
196212
retry-exempt-status-codes: 418

0 commit comments

Comments
 (0)