Skip to content

Commit d176962

Browse files
Merge branch 'trunk' into fix/major-publishing-actions
2 parents ecdde83 + b226691 commit d176962

293 files changed

Lines changed: 9271 additions & 6064 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.

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ LOCAL_DB_TYPE=mysql
4646
##
4747
# The database version to use.
4848
#
49-
# Defaults to 8.0 with the assumption that LOCAL_DB_TYPE is set to `mysql` above.
49+
# Defaults to 9.7 with the assumption that LOCAL_DB_TYPE is set to `mysql` above.
5050
#
5151
# When using `mysql`, see https://hub.docker.com/_/mysql for valid versions.
5252
# When using `mariadb`, see https://hub.docker.com/_/mariadb for valid versions.
5353
##
54-
LOCAL_DB_VERSION=8.4
54+
LOCAL_DB_VERSION=9.7
5555

5656
# Whether or not to enable multisite.
5757
LOCAL_MULTISITE=false

.github/workflows/commit-built-file-changes.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ jobs:
4040
if: ${{ github.repository == 'wordpress/wordpress-develop' }}
4141
timeout-minutes: 10
4242
permissions:
43-
contents: write
43+
# The actual `git push` is authenticated via a dedicated GitHub App installation token
44+
# generated below, so `GITHUB_TOKEN` only needs read access to the triggering workflow's artifacts.
45+
actions: read # Required to list and download the artifact uploaded by the triggering workflow run.
4446
steps:
4547
- name: Download artifact
4648
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
@@ -90,21 +92,18 @@ jobs:
9092
id: generate_token
9193
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
9294
env:
93-
GH_APP_ID: ${{ secrets.GH_PR_BUILT_FILES_APP_ID }}
95+
GH_APP_ID: ${{ vars.GH_PR_BUILT_FILES_APP_ID }}
9496
GH_APP_PRIVATE_KEY: ${{ secrets.GH_PR_BUILT_FILES_PRIVATE_KEY }}
9597
run: |
96-
echo "$GH_APP_PRIVATE_KEY" > private-key.pem
97-
9898
# Generate JWT
9999
JWT=$(python3 - <<EOF
100-
import jwt, time
101-
private_key = open("private-key.pem", "r").read()
100+
import jwt, time, os
102101
payload = {
103102
"iat": int(time.time()),
104103
"exp": int(time.time()) + 600, # 10-minute expiration
105-
"iss": $GH_APP_ID
104+
"iss": int(os.environ["GH_APP_ID"]),
106105
}
107-
print(jwt.encode(payload, private_key, algorithm="RS256"))
106+
print(jwt.encode(payload, os.environ["GH_APP_PRIVATE_KEY"], algorithm="RS256"))
108107
EOF
109108
)
110109
@@ -118,9 +117,7 @@ jobs:
118117
-H "Accept: application/vnd.github.v3+json" \
119118
"https://api.github.com/app/installations/$INSTALLATION_ID/access_tokens" | jq -r '.token')
120119
121-
echo "ACCESS_TOKEN=$ACCESS_TOKEN" >> "$GITHUB_ENV"
122-
123-
rm -f private-key.pem
120+
echo "access-token=$ACCESS_TOKEN" >> "$GITHUB_OUTPUT"
124121
125122
- name: Checkout repository
126123
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -130,12 +127,13 @@ jobs:
130127
ref: ${{ github.event.workflow_run.head_branch }}
131128
path: 'pr-repo'
132129
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
133-
token: ${{ env.ACCESS_TOKEN }}
130+
token: ${{ steps.generate_token.outputs.access-token }}
131+
persist-credentials: true
134132

135133
- name: Apply patch
136134
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
137135
working-directory: 'pr-repo'
138-
run: git apply ${{ github.workspace }}/changes.diff
136+
run: git apply "$GITHUB_WORKSPACE/changes.diff"
139137

140138
- name: Display changes to versioned files
141139
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
@@ -146,10 +144,10 @@ jobs:
146144
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
147145
working-directory: 'pr-repo'
148146
env:
149-
GH_APP_ID: ${{ secrets.GH_PR_BUILT_FILES_APP_ID }}
147+
GH_APP_ID: ${{ vars.GH_PR_BUILT_FILES_APP_ID }}
150148
run: |
151149
git config user.name "wordpress-develop-pr-bot[bot]"
152-
git config user.email ${{ env.GH_APP_ID }}+wordpress-develop-pr-bot[bot]@users.noreply.github.com
150+
git config user.email "${GH_APP_ID}+wordpress-develop-pr-bot[bot]@users.noreply.github.com"
153151
154152
- name: Stage changes
155153
if: ${{ steps.artifact-check.outputs.exists == 'true' }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ permissions: {}
5353

5454
env:
5555
LOCAL_DIR: build
56-
PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
56+
PUPPETEER_SKIP_DOWNLOAD: true
5757

5858
jobs:
5959
# Runs the end-to-end test suite.

.github/workflows/install-testing.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
uses: ./.github/workflows/reusable-support-json-reader-v1.yml
5050
permissions:
5151
contents: read
52-
secrets: inherit
5352
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
5453
with:
5554
wp-version: ${{ inputs.wp-version }}
@@ -95,11 +94,12 @@ jobs:
9594
- db-version: '9.3'
9695
- db-version: '9.4'
9796
- db-version: '9.5'
97+
- db-version: '9.6'
9898
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
9999
- php: '7.2'
100-
db-version: '9.6'
100+
db-version: '9.7'
101101
- php: '7.3'
102-
db-version: '9.6'
102+
db-version: '9.7'
103103

104104
services:
105105
database:
@@ -118,7 +118,7 @@ jobs:
118118
119119
steps:
120120
- name: Set up PHP ${{ matrix.php }}
121-
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
121+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
122122
with:
123123
php-version: '${{ matrix.php }}'
124124
coverage: none

.github/workflows/local-docker-environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ jobs:
7979
uses: ./.github/workflows/reusable-support-json-reader-v1.yml
8080
permissions:
8181
contents: read
82-
secrets: inherit
8382
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
8483
with:
8584
wp-version: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}
@@ -109,6 +108,7 @@ jobs:
109108
- db-version: '9.3'
110109
- db-version: '9.4'
111110
- db-version: '9.5'
111+
- db-version: '9.6'
112112
# No PHP 8.5 + Memcached support yet.
113113
- php: '8.5'
114114
memcached: true

.github/workflows/phpunit-tests.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,17 @@ jobs:
6666
uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
6767
permissions:
6868
contents: read
69-
secrets: inherit
69+
secrets:
70+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
71+
WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }}
7072
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) }}
7173
strategy:
7274
fail-fast: false
7375
matrix:
7476
os: [ ubuntu-24.04 ]
7577
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
7678
db-type: [ 'mysql' ]
77-
db-version: [ '5.7', '8.0', '8.4' ]
79+
db-version: [ '5.7', '8.0', '8.4', '9.7' ]
7880
tests-domain: [ 'example.org' ]
7981
multisite: [ false, true ]
8082
memcached: [ false ]
@@ -143,7 +145,9 @@ jobs:
143145
uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
144146
permissions:
145147
contents: read
146-
secrets: inherit
148+
secrets:
149+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
150+
WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }}
147151
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) }}
148152
strategy:
149153
fail-fast: false
@@ -177,7 +181,7 @@ jobs:
177181
multisite: ${{ matrix.multisite }}
178182
memcached: ${{ matrix.memcached }}
179183
phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
180-
report: ${{ false }}
184+
report: false
181185

182186
#
183187
# Creates PHPUnit test jobs to test MariaDB and MySQL innovation releases.
@@ -195,23 +199,23 @@ jobs:
195199
uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
196200
permissions:
197201
contents: read
198-
secrets: inherit
202+
secrets:
203+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
204+
WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }}
199205
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) }}
200206
strategy:
201207
fail-fast: false
202208
matrix:
203209
os: [ ubuntu-24.04 ]
204210
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
205211
db-type: [ 'mysql', 'mariadb' ]
206-
db-version: [ '9.6', '12.1' ]
212+
db-version: [ '12.1' ]
207213
multisite: [ false, true ]
208214
memcached: [ false ]
209215
db-innovation: [ true ]
210216

211217
exclude:
212218
# Exclude version combinations that don't exist.
213-
- db-type: 'mariadb'
214-
db-version: '9.6'
215219
- db-type: 'mysql'
216220
db-version: '12.1'
217221
with:
@@ -223,7 +227,7 @@ jobs:
223227
multisite: ${{ matrix.multisite }}
224228
memcached: ${{ matrix.memcached }}
225229
phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
226-
report: ${{ false }}
230+
report: false
227231

228232
#
229233
# Runs the HTML API test group.
@@ -238,7 +242,9 @@ jobs:
238242
uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
239243
permissions:
240244
contents: read
241-
secrets: inherit
245+
secrets:
246+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
247+
WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }}
242248
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) }}
243249
strategy:
244250
fail-fast: false
@@ -267,20 +273,22 @@ jobs:
267273
uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
268274
permissions:
269275
contents: read
270-
secrets: inherit
276+
secrets:
277+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
278+
WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }}
271279
if: ${{ ! startsWith( github.repository, 'WordPress/' ) && github.event_name == 'pull_request' }}
272280
strategy:
273281
fail-fast: false
274282
matrix:
275283
php: [ '7.4', '8.4' ]
276-
db-version: [ '8.4', '11.8' ]
284+
db-version: [ '9.7', '11.8' ]
277285
db-type: [ 'mysql', 'mariadb' ]
278286
multisite: [ false ]
279287

280288
include:
281289
# Include one multisite job for each database type.
282290
- php: '8.4'
283-
db-version: '8.4'
291+
db-version: '9.7'
284292
db-type: 'mysql'
285293
multisite: true
286294
- php: '8.4'
@@ -289,13 +297,13 @@ jobs:
289297
multisite: true
290298
# Test with memcached.
291299
- php: '8.4'
292-
db-version: '8.4'
300+
db-version: '9.7'
293301
db-type: 'mysql'
294302
multisite: true
295303
memcached: true
296304
# Run specific test groups once.
297305
- php: '8.4'
298-
db-version: '8.4'
306+
db-version: '9.7'
299307
db-type: 'mysql'
300308
phpunit-test-groups: 'html-api-html5lib-tests'
301309

@@ -304,7 +312,7 @@ jobs:
304312
- db-type: 'mysql'
305313
db-version: '11.8'
306314
- db-type: 'mariadb'
307-
db-version: '8.4'
315+
db-version: '9.7'
308316

309317
with:
310318
php: ${{ matrix.php }}

.github/workflows/reusable-build-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
persist-credentials: false
3636

3737
- name: Set up Node.js
38-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
38+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
3939
with:
4040
node-version-file: '.nvmrc'
4141
cache: npm
@@ -53,7 +53,7 @@ jobs:
5353
run: zip -q -r develop.zip wordpress/.
5454

5555
- name: Upload ZIP as a GitHub Actions artifact
56-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
56+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
5757
with:
5858
name: wordpress-develop
5959
path: develop.zip

.github/workflows/reusable-check-built-files.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ jobs:
4040
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4141
with:
4242
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
43+
persist-credentials: false
4344

4445
- name: Set up Node.js
45-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
46+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
4647
with:
4748
node-version-file: '.nvmrc'
4849
cache: npm
@@ -56,7 +57,7 @@ jobs:
5657
# Since Composer dependencies are installed using `composer update` and no lock file is in version control,
5758
# passing a custom cache suffix ensures that the cache is flushed at least once per week.
5859
- name: Install Composer dependencies
59-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0
60+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
6061
with:
6162
custom-cache-suffix: ${{ steps.get-date.outputs.date }}
6263

@@ -103,7 +104,7 @@ jobs:
103104

104105
# Uploads the diff file as an artifact.
105106
- name: Upload diff file as artifact
106-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
107+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
107108
if: ${{ steps.built-file-check.outputs.uncommitted_changes == 'true' }}
108109
with:
109110
name: pr-built-file-changes

.github/workflows/reusable-cleanup-pull-requests.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
# - Parse fixed ticket numbers from the commit message.
2020
# - Parse the SVN revision from the commit message.
2121
# - Searches for pull requests referencing any fixed tickets.
22-
# - Leaves a comment on each PR before closing.
22+
# - Comments on pull requests referencing any fixed tickets before closing.
2323
close-prs:
2424
name: Find and close PRs
2525
runs-on: ubuntu-24.04
@@ -43,13 +43,17 @@ jobs:
4343
COMMIT_MESSAGE="$(echo "$COMMIT_MSG_RAW" | sed -n '$p')"
4444
echo "svn_revision_number=$(echo "$COMMIT_MESSAGE" | sed -n 's/.*git-svn-id: https:\/\/develop.svn.wordpress.org\/[^@]*@\([0-9]*\) .*/\1/p')" >> "$GITHUB_OUTPUT"
4545
46-
- name: Find pull requests
47-
id: linked-prs
46+
- name: Find, comment on, and close pull requests
4847
if: ${{ steps.trac-tickets.outputs.fixed_list != '' && steps.git-svn-id.outputs.svn_revision_number != '' }}
4948
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
49+
env:
50+
FIXED_LIST: ${{ steps.trac-tickets.outputs.fixed_list }}
51+
SVN_REVISION_NUMBER: ${{ steps.git-svn-id.outputs.svn_revision_number }}
5052
with:
5153
script: |
52-
const fixedList = "${{ steps.trac-tickets.outputs.fixed_list }}".split(' ').filter(Boolean);
54+
const fixedList = process.env.FIXED_LIST.split(' ').filter(Boolean);
55+
const svnRevisionNumber = process.env.SVN_REVISION_NUMBER;
56+
const githubSha = process.env.GITHUB_SHA;
5357
let prNumbers = [];
5458
5559
for (const ticket of fixedList) {
@@ -86,19 +90,10 @@ jobs:
8690
prNumbers.push(...matchingPRs);
8791
}
8892
89-
return prNumbers;
90-
91-
- name: Comment and close pull requests
92-
if: ${{ steps.trac-tickets.outputs.fixed_list != '' && steps.git-svn-id.outputs.svn_revision_number != '' }}
93-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
94-
with:
95-
script: |
96-
const prNumbers = ${{ steps.linked-prs.outputs.result }};
97-
9893
const commentBody = `A commit was made that fixes the Trac ticket referenced in the description of this pull request.
9994
100-
SVN changeset: [${{ steps.git-svn-id.outputs.svn_revision_number }}](https://core.trac.wordpress.org/changeset/${{ steps.git-svn-id.outputs.svn_revision_number }})
101-
GitHub commit: https://github.com/WordPress/wordpress-develop/commit/${{ github.sha }}
95+
SVN changeset: [${svnRevisionNumber}](https://core.trac.wordpress.org/changeset/${svnRevisionNumber})
96+
GitHub commit: https://github.com/WordPress/wordpress-develop/commit/${githubSha}
10297
10398
This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.`;
10499

0 commit comments

Comments
 (0)