Skip to content

Commit beae7c0

Browse files
committed
Create separate matrix for testing more Node versions
1 parent e0d430a commit beae7c0

1 file changed

Lines changed: 41 additions & 9 deletions

File tree

.github/workflows/test-build-processes.yml

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ jobs:
5656
fail-fast: false
5757
matrix:
5858
os: [ 'ubuntu-24.04' ]
59-
node: [ '', '22', '24' ]
6059
directory: [ 'src', 'build' ]
6160
include:
6261
# Only prepare artifacts for Playground once.
@@ -66,7 +65,6 @@ jobs:
6665
prepare-playground: ${{ github.event_name == 'pull_request' && true || '' }}
6766
with:
6867
os: ${{ matrix.os }}
69-
node-version: ${{ matrix.node }}
7068
directory: ${{ matrix.directory }}
7169
save-build: ${{ matrix.save-build && matrix.save-build || false }}
7270
prepare-playground: ${{ matrix.prepare-playground && matrix.prepare-playground || false }}
@@ -91,11 +89,9 @@ jobs:
9189
fail-fast: false
9290
matrix:
9391
os: [ 'macos-14', 'windows-2022' ]
94-
node: [ '', '22', '24' ]
9592
directory: [ 'src', 'build' ]
9693
with:
9794
os: ${{ matrix.os }}
98-
node-version: ${{ matrix.node }}
9995
directory: ${{ matrix.directory }}
10096

10197
# Tests the Gutenberg plugin build process within a wordpress-develop checkout.
@@ -109,11 +105,9 @@ jobs:
109105
fail-fast: false
110106
matrix:
111107
os: [ 'ubuntu-24.04' ]
112-
node: [ '', '22', '24' ]
113108
directory: [ 'src', 'build' ]
114109
with:
115110
os: ${{ matrix.os }}
116-
node-version: ${{ matrix.node }}
117111
directory: ${{ matrix.directory }}
118112

119113
# Tests the Gutenberg plugin build process on additional operating systems.
@@ -136,11 +130,49 @@ jobs:
136130
fail-fast: false
137131
matrix:
138132
os: [ 'macos-14', 'windows-2022' ]
139-
node: [ '', '22', '24' ]
140133
directory: [ 'src', 'build' ]
141134
with:
142135
os: ${{ matrix.os }}
143-
node-version: ${{ matrix.node }}
136+
directory: ${{ matrix.directory }}
137+
138+
# Tests the WordPress Core build process on additional Node.js versions.
139+
#
140+
# Testing against additional Node.js versions can help spot potential issues before upgrading.
141+
test-core-build-process-additional-node-versions:
142+
name: Core running from ${{ matrix.directory }}
143+
uses: ./.github/workflows/reusable-test-core-build-process.yml
144+
permissions:
145+
contents: read
146+
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
147+
strategy:
148+
fail-fast: false
149+
matrix:
150+
os: [ 'ubuntu-24.04', 'macos-14', 'windows-2022' ]
151+
node-version: [ '22', '24' ]
152+
directory: [ 'src', 'build' ]
153+
with:
154+
os: ${{ matrix.os }}
155+
node-version: ${{ matrix.node-version }}
156+
directory: ${{ matrix.directory }}
157+
158+
# Tests the Gutenberg build process on additional Node.js versions.
159+
#
160+
# Testing against additional Node.js versions can help spot potential issues before upgrading.
161+
test-gutenberg-build-process-additional-node-versions:
162+
name: Core running from ${{ matrix.directory }}
163+
uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml
164+
permissions:
165+
contents: read
166+
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
167+
strategy:
168+
fail-fast: false
169+
matrix:
170+
os: [ 'ubuntu-24.04', 'macos-14', 'windows-2022' ]
171+
node-version: [ '22', '24' ]
172+
directory: [ 'src', 'build' ]
173+
with:
174+
os: ${{ matrix.os }}
175+
node-version: ${{ matrix.node-version }}
144176
directory: ${{ matrix.directory }}
145177

146178
slack-notifications:
@@ -149,7 +181,7 @@ jobs:
149181
permissions:
150182
actions: read
151183
contents: read
152-
needs: [ test-core-build-process, test-core-build-process-additional-os, test-gutenberg-build-process, test-gutenberg-build-process-additional-os ]
184+
needs: [ test-core-build-process, test-core-build-process-additional-os, test-gutenberg-build-process, test-gutenberg-build-process-additional-os, test-core-build-process-additional-node-versions, test-gutenberg-build-process-additional-node-versions ]
153185
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
154186
with:
155187
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}

0 commit comments

Comments
 (0)