From 1ca48c12d8160877c3426888c27befeb00253c6e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Fri, 7 Aug 2026 10:41:49 -0400 Subject: [PATCH 1/3] Add missing job name. --- .github/workflows/phpunit-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 2b9bbfe891640..0686a70fef0e5 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -61,6 +61,7 @@ jobs: # them, because a job that needs a skipped job is skipped too, and a broader one # downloads a build that nothing consumes. prepare-gutenberg: + name: Prepare Gutenberg Assets uses: ./.github/workflows/reusable-prepare-gutenberg.yml permissions: contents: read From 26d53728a7910a0bdc46c2a7b630b054986dd932 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Fri, 7 Aug 2026 10:46:50 -0400 Subject: [PATCH 2/3] Remove elaborate job description. This description is pretty verbose and it took me 2 or 3 reads to actually understand what it was trying to say. Because the job is defined as a prerequisite for later ones with `needs`, the conditions that this one should run under are implicit, someone should be able to determine this when reading the workflow without it being spelled out explicitly. --- .github/workflows/phpunit-tests.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 0686a70fef0e5..0b574f3efc3a8 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -53,13 +53,6 @@ permissions: {} jobs: # Downloads and verifies the Gutenberg build once for all PHPUnit jobs. - # - # This condition is the union of the conditions on the jobs that need it, reduced. - # The org matrices require `WordPress/wordpress-develop` or a pull request, and the - # fork matrix requires a pull request, so `wordpress-develop` or a pull request - # covers every case. Keep it in step with those jobs: a narrower condition orphans - # them, because a job that needs a skipped job is skipped too, and a broader one - # downloads a build that nothing consumes. prepare-gutenberg: name: Prepare Gutenberg Assets uses: ./.github/workflows/reusable-prepare-gutenberg.yml From 736aa6c23752b3b7085010b976db2c5a75d8e59d Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Fri, 7 Aug 2026 11:22:10 -0400 Subject: [PATCH 3/3] Change `gutenberg-artifact` to a boolean flag. The artifact name should always be the same, so there's no need for this input to be a string. Instead, let's make it a boolean flag with a default of `false` to avoid having to backport this change to every branch using `v3` of the reusable PHPUnit workflow. Eventually when `v4` is created, the input can go away entirely because every branch will need related the steps. --- .github/workflows/phpunit-tests.yml | 10 +++++----- .github/workflows/reusable-phpunit-tests-v3.yml | 14 ++++++-------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 0b574f3efc3a8..94a2ddf187d9e 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -138,7 +138,7 @@ jobs: phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} tests-domain: ${{ matrix.tests-domain }} report: ${{ matrix.report || false }} - gutenberg-artifact: gutenberg-build + gutenberg-artifact: ${{ needs.prepare-gutenberg.result != 'skipped' }} gutenberg-sha: ${{ needs.prepare-gutenberg.outputs.gutenberg-sha }} # @@ -194,7 +194,7 @@ jobs: memcached: ${{ matrix.memcached }} phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} report: false - gutenberg-artifact: gutenberg-build + gutenberg-artifact: ${{ needs.prepare-gutenberg.result != 'skipped' }} gutenberg-sha: ${{ needs.prepare-gutenberg.outputs.gutenberg-sha }} # @@ -244,7 +244,7 @@ jobs: memcached: ${{ matrix.memcached }} phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} report: false - gutenberg-artifact: gutenberg-build + gutenberg-artifact: ${{ needs.prepare-gutenberg.result != 'skipped' }} gutenberg-sha: ${{ needs.prepare-gutenberg.outputs.gutenberg-sha }} # @@ -279,7 +279,7 @@ jobs: db-type: ${{ matrix.db-type }} db-version: ${{ matrix.db-version }} phpunit-test-groups: ${{ matrix.phpunit-test-groups }} - gutenberg-artifact: gutenberg-build + gutenberg-artifact: ${{ needs.prepare-gutenberg.result != 'skipped' }} gutenberg-sha: ${{ needs.prepare-gutenberg.outputs.gutenberg-sha }} # @@ -344,7 +344,7 @@ jobs: memcached: ${{ matrix.memcached || false }} phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} phpunit-test-groups: ${{ matrix.phpunit-test-groups || '' }} - gutenberg-artifact: gutenberg-build + gutenberg-artifact: ${{ needs.prepare-gutenberg.result != 'skipped' }} gutenberg-sha: ${{ needs.prepare-gutenberg.outputs.gutenberg-sha }} slack-notifications: diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index 6a7f49fba468c..1c09113810dd3 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -73,10 +73,10 @@ on: type: boolean default: false gutenberg-artifact: - description: 'The name of a same-workflow artifact containing the prepared Gutenberg build. Optional: callers that omit it download Gutenberg per job.' + description: 'Whether the Gutenberg-sourced assets are sourced from zip artifact.' required: false - type: string - default: '' + type: boolean + default: false gutenberg-sha: description: 'The immutable Gutenberg source SHA verified by the calling workflow.' required: false @@ -146,14 +146,12 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} persist-credentials: false - # Branches >= 5.9 call this workflow at @trunk without the producer job, so they - # pass no artifact. They skip this step and fall back to a per-job download. + # Only WordPress 7.0+ include Gutenberg-maintained assets from a built zip file. - name: Download prepared Gutenberg build - if: inputs.gutenberg-artifact != '' + if: ${{ inputs.gutenberg-artifact }} uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: - # Without a run ID, this action reads only from the caller's current workflow run. - name: ${{ inputs.gutenberg-artifact }} + name: gutenberg-build path: gutenberg digest-mismatch: error