From 4a8fa4fc822ae11690d935f837f4617bd9bbcfc1 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:13:53 -0500 Subject: [PATCH 01/11] Add caching for the `/gutenberg` directory --- .github/workflows/reusable-build-package.yml | 10 ++++++++++ .github/workflows/reusable-check-built-files.yml | 10 ++++++++++ .../workflows/reusable-coding-standards-javascript.yml | 10 ++++++++++ .github/workflows/reusable-end-to-end-tests.yml | 10 ++++++++++ .github/workflows/reusable-javascript-tests.yml | 10 ++++++++++ .github/workflows/reusable-performance-test-v2.yml | 10 ++++++++++ .github/workflows/reusable-phpunit-tests-v3.yml | 10 ++++++++++ .github/workflows/reusable-test-core-build-process.yml | 10 ++++++++++ .../reusable-test-local-docker-environment-v1.yml | 10 ++++++++++ 9 files changed, 90 insertions(+) diff --git a/.github/workflows/reusable-build-package.yml b/.github/workflows/reusable-build-package.yml index 1679f1938df17..ca819eae9cfc0 100644 --- a/.github/workflows/reusable-build-package.yml +++ b/.github/workflows/reusable-build-package.yml @@ -34,6 +34,16 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} persist-credentials: false + - name: Retrieve the pinned Gutenberg SHA value + id: gutenberg-pinned-ref + run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + + - name: Configure caching for Gutenberg directory. + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 + with: + path: 'gutenberg' + key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index c1d05d821dec5..dccb6ddcada34 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -41,6 +41,16 @@ jobs: with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} + - name: Retrieve the pinned Gutenberg SHA value + id: gutenberg-pinned-ref + run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + + - name: Configure caching for Gutenberg directory. + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 + with: + path: 'gutenberg' + key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: diff --git a/.github/workflows/reusable-coding-standards-javascript.yml b/.github/workflows/reusable-coding-standards-javascript.yml index 5ad9212e7e58d..ffa3977b5c127 100644 --- a/.github/workflows/reusable-coding-standards-javascript.yml +++ b/.github/workflows/reusable-coding-standards-javascript.yml @@ -39,6 +39,16 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} persist-credentials: false + - name: Retrieve the pinned Gutenberg SHA value + id: gutenberg-pinned-ref + run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + + - name: Configure caching for Gutenberg directory. + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 + with: + path: 'gutenberg' + key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: diff --git a/.github/workflows/reusable-end-to-end-tests.yml b/.github/workflows/reusable-end-to-end-tests.yml index 92ef4fafc32d0..17dec44f79158 100644 --- a/.github/workflows/reusable-end-to-end-tests.yml +++ b/.github/workflows/reusable-end-to-end-tests.yml @@ -81,6 +81,16 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} persist-credentials: false + - name: Retrieve the pinned Gutenberg SHA value + id: gutenberg-pinned-ref + run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + + - name: Configure caching for Gutenberg directory. + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 + with: + path: 'gutenberg' + key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: diff --git a/.github/workflows/reusable-javascript-tests.yml b/.github/workflows/reusable-javascript-tests.yml index 0b6d28e44a93b..d4c41a58a915c 100644 --- a/.github/workflows/reusable-javascript-tests.yml +++ b/.github/workflows/reusable-javascript-tests.yml @@ -40,6 +40,16 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} persist-credentials: false + - name: Retrieve the pinned Gutenberg SHA value + id: gutenberg-pinned-ref + run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + + - name: Configure caching for Gutenberg directory. + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 + with: + path: 'gutenberg' + key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: diff --git a/.github/workflows/reusable-performance-test-v2.yml b/.github/workflows/reusable-performance-test-v2.yml index f9259f2b5824f..8ba35a9766cd4 100644 --- a/.github/workflows/reusable-performance-test-v2.yml +++ b/.github/workflows/reusable-performance-test-v2.yml @@ -121,6 +121,16 @@ jobs: fetch-depth: ${{ github.event_name == 'workflow_dispatch' && '2' || '1' }} persist-credentials: false + - name: Retrieve the pinned Gutenberg SHA value + id: gutenberg-pinned-ref + run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + + - name: Configure caching for Gutenberg directory. + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 + with: + path: 'gutenberg' + key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index 45198c20f5e52..1b1de18999efd 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -136,6 +136,16 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} persist-credentials: false + - name: Retrieve the pinned Gutenberg SHA value + id: gutenberg-pinned-ref + run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + + - name: Configure caching for Gutenberg directory. + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 + with: + path: 'gutenberg' + key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: diff --git a/.github/workflows/reusable-test-core-build-process.yml b/.github/workflows/reusable-test-core-build-process.yml index 4bec59e285c57..421651e79307c 100644 --- a/.github/workflows/reusable-test-core-build-process.yml +++ b/.github/workflows/reusable-test-core-build-process.yml @@ -75,6 +75,16 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} persist-credentials: false + - name: Retrieve the pinned Gutenberg SHA value + id: gutenberg-pinned-ref + run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + + - name: Configure caching for Gutenberg directory. + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 + with: + path: 'gutenberg' + key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + # This date is used to ensure that the PHPCS cache is cleared at least once every week. # http://man7.org/linux/man-pages/man1/date.1.html - name: "Get last Monday's date" diff --git a/.github/workflows/reusable-test-local-docker-environment-v1.yml b/.github/workflows/reusable-test-local-docker-environment-v1.yml index 698956ff00346..cfc58b2183462 100644 --- a/.github/workflows/reusable-test-local-docker-environment-v1.yml +++ b/.github/workflows/reusable-test-local-docker-environment-v1.yml @@ -91,6 +91,16 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} persist-credentials: false + - name: Retrieve the pinned Gutenberg SHA value + id: gutenberg-pinned-ref + run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + + - name: Configure caching for Gutenberg directory. + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 + with: + path: 'gutenberg' + key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: From c63bcc9b9dc6292ebb1bfcab2b8a2cd934e49f12 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:26:42 -0500 Subject: [PATCH 02/11] Update the inline documentation for each job. --- .github/workflows/reusable-build-package.yml | 2 ++ .github/workflows/reusable-check-built-files.yml | 2 ++ .github/workflows/reusable-coding-standards-javascript.yml | 2 ++ .github/workflows/reusable-end-to-end-tests.yml | 2 ++ .github/workflows/reusable-javascript-tests.yml | 2 ++ .github/workflows/reusable-performance-test-v2.yml | 4 +++- .github/workflows/reusable-phpunit-tests-v3.yml | 2 ++ .github/workflows/reusable-test-core-build-process.yml | 2 ++ .../workflows/reusable-test-local-docker-environment-v1.yml | 2 ++ 9 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-package.yml b/.github/workflows/reusable-build-package.yml index ca819eae9cfc0..875560f914ddc 100644 --- a/.github/workflows/reusable-build-package.yml +++ b/.github/workflows/reusable-build-package.yml @@ -15,6 +15,8 @@ jobs: # # Performs the following steps: # - Checks out the repository. + # - Retrieves the pinned commit hash for the Gutenberg repository. + # - Configures caching for the /gutenberg directory. # - Sets up Node.js. # - Runs the build script. # - Prepares the directory structure for the ZIP. diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index dccb6ddcada34..448e6dd14bebf 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -16,6 +16,8 @@ jobs: # # Performs the following steps: # - Checks out the repository. + # - Retrieves the pinned commit hash for the Gutenberg repository. + # - Configures caching for the /gutenberg directory. # - Sets up Node.js. # - Configures caching for Composer. # - Installs Composer dependencies. diff --git a/.github/workflows/reusable-coding-standards-javascript.yml b/.github/workflows/reusable-coding-standards-javascript.yml index ffa3977b5c127..7e28842bfcd61 100644 --- a/.github/workflows/reusable-coding-standards-javascript.yml +++ b/.github/workflows/reusable-coding-standards-javascript.yml @@ -20,6 +20,8 @@ jobs: # # Performs the following steps: # - Checks out the repository. + # - Retrieves the pinned commit hash for the Gutenberg repository. + # - Configures caching for the /gutenberg directory. # - Sets up Node.js. # - Logs debug information about the GitHub Action runner. # - Installs npm dependencies. diff --git a/.github/workflows/reusable-end-to-end-tests.yml b/.github/workflows/reusable-end-to-end-tests.yml index 17dec44f79158..767b27bdb0ad4 100644 --- a/.github/workflows/reusable-end-to-end-tests.yml +++ b/.github/workflows/reusable-end-to-end-tests.yml @@ -48,6 +48,8 @@ jobs: # Performs the following steps: # - Sets environment variables. # - Checks out the repository. + # - Retrieves the pinned commit hash for the Gutenberg repository. + # - Configures caching for the /gutenberg directory. # - Sets up Node.js. # - Logs debug information about the GitHub Action runner. # - Installs npm dependencies. diff --git a/.github/workflows/reusable-javascript-tests.yml b/.github/workflows/reusable-javascript-tests.yml index d4c41a58a915c..d9f348b074fa5 100644 --- a/.github/workflows/reusable-javascript-tests.yml +++ b/.github/workflows/reusable-javascript-tests.yml @@ -21,6 +21,8 @@ jobs: # # Performs the following steps: # - Checks out the repository. + # - Retrieves the pinned commit hash for the Gutenberg repository. + # - Configures caching for the /gutenberg directory. # - Sets up Node.js. # - Logs debug information about the GitHub Action runner. # - Installs npm dependencies. diff --git a/.github/workflows/reusable-performance-test-v2.yml b/.github/workflows/reusable-performance-test-v2.yml index 8ba35a9766cd4..deb6f68aba25b 100644 --- a/.github/workflows/reusable-performance-test-v2.yml +++ b/.github/workflows/reusable-performance-test-v2.yml @@ -77,7 +77,9 @@ jobs: # Performs the following steps: # - Configure environment variables. # - Checkout repository. - # - Set up Node.js. + # - Retrieves the pinned commit hash for the Gutenberg repository. + # - Configures caching for the /gutenberg directory. + # - Sets up Node.js. # - Log debug information. # - Install npm dependencies. # - Install Playwright browsers. diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index 1b1de18999efd..45ccfe4b5ab74 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -101,6 +101,8 @@ jobs: # Performs the following steps: # - Sets environment variables. # - Checks out the repository. + # - Retrieves the pinned commit hash for the Gutenberg repository. + # - Configures caching for the /gutenberg directory. # - Sets up Node.js. # - Sets up PHP. # - Installs Composer dependencies. diff --git a/.github/workflows/reusable-test-core-build-process.yml b/.github/workflows/reusable-test-core-build-process.yml index 421651e79307c..bd9a10794f653 100644 --- a/.github/workflows/reusable-test-core-build-process.yml +++ b/.github/workflows/reusable-test-core-build-process.yml @@ -50,6 +50,8 @@ jobs: # # Performs the following steps: # - Checks out the repository. + # - Retrieves the pinned commit hash for the Gutenberg repository. + # - Configures caching for the /gutenberg directory. # - Sets up Node.js. # - Logs debug information about the GitHub Action runner. # - Installs npm dependencies. diff --git a/.github/workflows/reusable-test-local-docker-environment-v1.yml b/.github/workflows/reusable-test-local-docker-environment-v1.yml index cfc58b2183462..50b05fa20bb03 100644 --- a/.github/workflows/reusable-test-local-docker-environment-v1.yml +++ b/.github/workflows/reusable-test-local-docker-environment-v1.yml @@ -57,6 +57,8 @@ jobs: # Performs the following steps: # - Sets environment variables. # - Checks out the repository. + # - Retrieves the pinned commit hash for the Gutenberg repository. + # - Configures caching for the /gutenberg directory. # - Sets up Node.js. # - Sets up PHP. # - Installs Composer dependencies. From 83348a86cc3af1f3318cb64e596e93743b54d857 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:28:32 -0500 Subject: [PATCH 03/11] Use "sha" instead of "ref" Refs are meant to be human readable. The value being pinned for the repository is a commit hash value (SHA). This uses the correct terminology. --- .github/workflows/reusable-build-package.yml | 6 +++--- .github/workflows/reusable-check-built-files.yml | 6 +++--- .github/workflows/reusable-coding-standards-javascript.yml | 6 +++--- .github/workflows/reusable-end-to-end-tests.yml | 6 +++--- .github/workflows/reusable-javascript-tests.yml | 6 +++--- .github/workflows/reusable-performance-test-v2.yml | 6 +++--- .github/workflows/reusable-phpunit-tests-v3.yml | 6 +++--- .github/workflows/reusable-test-core-build-process.yml | 6 +++--- .../workflows/reusable-test-local-docker-environment-v1.yml | 6 +++--- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/reusable-build-package.yml b/.github/workflows/reusable-build-package.yml index 875560f914ddc..267cd08fa0974 100644 --- a/.github/workflows/reusable-build-package.yml +++ b/.github/workflows/reusable-build-package.yml @@ -37,14 +37,14 @@ jobs: persist-credentials: false - name: Retrieve the pinned Gutenberg SHA value - id: gutenberg-pinned-ref - run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + id: gutenberg-pinned-sha + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: 'gutenberg' - key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index 448e6dd14bebf..337a9068d2eb9 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -44,14 +44,14 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Retrieve the pinned Gutenberg SHA value - id: gutenberg-pinned-ref - run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + id: gutenberg-pinned-sha + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: 'gutenberg' - key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-coding-standards-javascript.yml b/.github/workflows/reusable-coding-standards-javascript.yml index 7e28842bfcd61..76f65fcd32535 100644 --- a/.github/workflows/reusable-coding-standards-javascript.yml +++ b/.github/workflows/reusable-coding-standards-javascript.yml @@ -42,14 +42,14 @@ jobs: persist-credentials: false - name: Retrieve the pinned Gutenberg SHA value - id: gutenberg-pinned-ref - run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + id: gutenberg-pinned-sha + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: 'gutenberg' - key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-end-to-end-tests.yml b/.github/workflows/reusable-end-to-end-tests.yml index 767b27bdb0ad4..f2acf871afd12 100644 --- a/.github/workflows/reusable-end-to-end-tests.yml +++ b/.github/workflows/reusable-end-to-end-tests.yml @@ -84,14 +84,14 @@ jobs: persist-credentials: false - name: Retrieve the pinned Gutenberg SHA value - id: gutenberg-pinned-ref - run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + id: gutenberg-pinned-sha + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: 'gutenberg' - key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-javascript-tests.yml b/.github/workflows/reusable-javascript-tests.yml index d9f348b074fa5..8c2bee1b8bd58 100644 --- a/.github/workflows/reusable-javascript-tests.yml +++ b/.github/workflows/reusable-javascript-tests.yml @@ -43,14 +43,14 @@ jobs: persist-credentials: false - name: Retrieve the pinned Gutenberg SHA value - id: gutenberg-pinned-ref - run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + id: gutenberg-pinned-sha + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: 'gutenberg' - key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-performance-test-v2.yml b/.github/workflows/reusable-performance-test-v2.yml index deb6f68aba25b..ae95c07795ff7 100644 --- a/.github/workflows/reusable-performance-test-v2.yml +++ b/.github/workflows/reusable-performance-test-v2.yml @@ -124,14 +124,14 @@ jobs: persist-credentials: false - name: Retrieve the pinned Gutenberg SHA value - id: gutenberg-pinned-ref - run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + id: gutenberg-pinned-sha + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: 'gutenberg' - key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index 45ccfe4b5ab74..e91134f4a6d9e 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -139,14 +139,14 @@ jobs: persist-credentials: false - name: Retrieve the pinned Gutenberg SHA value - id: gutenberg-pinned-ref - run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + id: gutenberg-pinned-sha + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: 'gutenberg' - key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-test-core-build-process.yml b/.github/workflows/reusable-test-core-build-process.yml index bd9a10794f653..c647a9c2b5969 100644 --- a/.github/workflows/reusable-test-core-build-process.yml +++ b/.github/workflows/reusable-test-core-build-process.yml @@ -78,14 +78,14 @@ jobs: persist-credentials: false - name: Retrieve the pinned Gutenberg SHA value - id: gutenberg-pinned-ref - run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + id: gutenberg-pinned-sha + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: 'gutenberg' - key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} # This date is used to ensure that the PHPCS cache is cleared at least once every week. # http://man7.org/linux/man-pages/man1/date.1.html diff --git a/.github/workflows/reusable-test-local-docker-environment-v1.yml b/.github/workflows/reusable-test-local-docker-environment-v1.yml index 50b05fa20bb03..693965b21396e 100644 --- a/.github/workflows/reusable-test-local-docker-environment-v1.yml +++ b/.github/workflows/reusable-test-local-docker-environment-v1.yml @@ -94,14 +94,14 @@ jobs: persist-credentials: false - name: Retrieve the pinned Gutenberg SHA value - id: gutenberg-pinned-ref - run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + id: gutenberg-pinned-sha + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: 'gutenberg' - key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 From a74c880aeffa882031a0fdcc16f30d37818d9971 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Wed, 18 Feb 2026 11:58:35 -0500 Subject: [PATCH 04/11] Exclude the `node_modules` directory in the cache. --- .github/workflows/reusable-build-package.yml | 4 +++- .github/workflows/reusable-check-built-files.yml | 4 +++- .github/workflows/reusable-coding-standards-javascript.yml | 4 +++- .github/workflows/reusable-end-to-end-tests.yml | 4 +++- .github/workflows/reusable-javascript-tests.yml | 4 +++- .github/workflows/reusable-performance-test-v2.yml | 4 +++- .github/workflows/reusable-phpunit-tests-v3.yml | 4 +++- .github/workflows/reusable-test-core-build-process.yml | 4 +++- .../workflows/reusable-test-local-docker-environment-v1.yml | 4 +++- 9 files changed, 27 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-build-package.yml b/.github/workflows/reusable-build-package.yml index 267cd08fa0974..cc84a9ca5b2ad 100644 --- a/.github/workflows/reusable-build-package.yml +++ b/.github/workflows/reusable-build-package.yml @@ -43,7 +43,9 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: 'gutenberg' + path: | + 'gutenberg' + '!gutenberg/node_modules' key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index 337a9068d2eb9..d565d381f1b80 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -50,7 +50,9 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: 'gutenberg' + path: | + 'gutenberg' + '!gutenberg/node_modules' key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js diff --git a/.github/workflows/reusable-coding-standards-javascript.yml b/.github/workflows/reusable-coding-standards-javascript.yml index 76f65fcd32535..2387fe4629eaa 100644 --- a/.github/workflows/reusable-coding-standards-javascript.yml +++ b/.github/workflows/reusable-coding-standards-javascript.yml @@ -48,7 +48,9 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: 'gutenberg' + path: | + 'gutenberg' + '!gutenberg/node_modules' key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js diff --git a/.github/workflows/reusable-end-to-end-tests.yml b/.github/workflows/reusable-end-to-end-tests.yml index f2acf871afd12..ae1c39ad75179 100644 --- a/.github/workflows/reusable-end-to-end-tests.yml +++ b/.github/workflows/reusable-end-to-end-tests.yml @@ -90,7 +90,9 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: 'gutenberg' + path: | + 'gutenberg' + '!gutenberg/node_modules' key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js diff --git a/.github/workflows/reusable-javascript-tests.yml b/.github/workflows/reusable-javascript-tests.yml index 8c2bee1b8bd58..112dd5b637db9 100644 --- a/.github/workflows/reusable-javascript-tests.yml +++ b/.github/workflows/reusable-javascript-tests.yml @@ -49,7 +49,9 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: 'gutenberg' + path: | + 'gutenberg' + '!gutenberg/node_modules' key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js diff --git a/.github/workflows/reusable-performance-test-v2.yml b/.github/workflows/reusable-performance-test-v2.yml index ae95c07795ff7..9e52cfe38b42a 100644 --- a/.github/workflows/reusable-performance-test-v2.yml +++ b/.github/workflows/reusable-performance-test-v2.yml @@ -130,7 +130,9 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: 'gutenberg' + path: | + 'gutenberg' + '!gutenberg/node_modules' key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index e91134f4a6d9e..bbfca35648c75 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -145,7 +145,9 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: 'gutenberg' + path: | + 'gutenberg' + '!gutenberg/node_modules' key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js diff --git a/.github/workflows/reusable-test-core-build-process.yml b/.github/workflows/reusable-test-core-build-process.yml index c647a9c2b5969..9f818517b624b 100644 --- a/.github/workflows/reusable-test-core-build-process.yml +++ b/.github/workflows/reusable-test-core-build-process.yml @@ -84,7 +84,9 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: 'gutenberg' + path: | + 'gutenberg' + '!gutenberg/node_modules' key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} # This date is used to ensure that the PHPCS cache is cleared at least once every week. diff --git a/.github/workflows/reusable-test-local-docker-environment-v1.yml b/.github/workflows/reusable-test-local-docker-environment-v1.yml index 693965b21396e..a4b4b2c2843f4 100644 --- a/.github/workflows/reusable-test-local-docker-environment-v1.yml +++ b/.github/workflows/reusable-test-local-docker-environment-v1.yml @@ -100,7 +100,9 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: 'gutenberg' + path: | + 'gutenberg' + '!gutenberg/node_modules' key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} - name: Set up Node.js From 4634909de96a6f795fe33d4e98729ef3a1065cf8 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Wed, 18 Feb 2026 15:19:34 -0500 Subject: [PATCH 05/11] Prevent globbing and word splitting. --- .github/workflows/reusable-build-package.yml | 2 +- .github/workflows/reusable-check-built-files.yml | 2 +- .github/workflows/reusable-coding-standards-javascript.yml | 2 +- .github/workflows/reusable-end-to-end-tests.yml | 2 +- .github/workflows/reusable-javascript-tests.yml | 2 +- .github/workflows/reusable-performance-test-v2.yml | 2 +- .github/workflows/reusable-phpunit-tests-v3.yml | 2 +- .github/workflows/reusable-test-core-build-process.yml | 2 +- .github/workflows/reusable-test-local-docker-environment-v1.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-build-package.yml b/.github/workflows/reusable-build-package.yml index cc84a9ca5b2ad..8c4e0dd287544 100644 --- a/.github/workflows/reusable-build-package.yml +++ b/.github/workflows/reusable-build-package.yml @@ -38,7 +38,7 @@ jobs: - name: Retrieve the pinned Gutenberg SHA value id: gutenberg-pinned-sha - run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> "$GITHUB_OUTPUT" - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index d565d381f1b80..df392ab2139cb 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -45,7 +45,7 @@ jobs: - name: Retrieve the pinned Gutenberg SHA value id: gutenberg-pinned-sha - run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> "$GITHUB_OUTPUT" - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 diff --git a/.github/workflows/reusable-coding-standards-javascript.yml b/.github/workflows/reusable-coding-standards-javascript.yml index 2387fe4629eaa..d995a8baa51fc 100644 --- a/.github/workflows/reusable-coding-standards-javascript.yml +++ b/.github/workflows/reusable-coding-standards-javascript.yml @@ -43,7 +43,7 @@ jobs: - name: Retrieve the pinned Gutenberg SHA value id: gutenberg-pinned-sha - run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> "$GITHUB_OUTPUT" - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 diff --git a/.github/workflows/reusable-end-to-end-tests.yml b/.github/workflows/reusable-end-to-end-tests.yml index ae1c39ad75179..d7b3fbbb6056d 100644 --- a/.github/workflows/reusable-end-to-end-tests.yml +++ b/.github/workflows/reusable-end-to-end-tests.yml @@ -85,7 +85,7 @@ jobs: - name: Retrieve the pinned Gutenberg SHA value id: gutenberg-pinned-sha - run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> "$GITHUB_OUTPUT" - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 diff --git a/.github/workflows/reusable-javascript-tests.yml b/.github/workflows/reusable-javascript-tests.yml index 112dd5b637db9..9e41964cf88be 100644 --- a/.github/workflows/reusable-javascript-tests.yml +++ b/.github/workflows/reusable-javascript-tests.yml @@ -44,7 +44,7 @@ jobs: - name: Retrieve the pinned Gutenberg SHA value id: gutenberg-pinned-sha - run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> "$GITHUB_OUTPUT" - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 diff --git a/.github/workflows/reusable-performance-test-v2.yml b/.github/workflows/reusable-performance-test-v2.yml index 9e52cfe38b42a..7cff810cf0176 100644 --- a/.github/workflows/reusable-performance-test-v2.yml +++ b/.github/workflows/reusable-performance-test-v2.yml @@ -125,7 +125,7 @@ jobs: - name: Retrieve the pinned Gutenberg SHA value id: gutenberg-pinned-sha - run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> "$GITHUB_OUTPUT" - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index bbfca35648c75..eec4c2edcc8bc 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -140,7 +140,7 @@ jobs: - name: Retrieve the pinned Gutenberg SHA value id: gutenberg-pinned-sha - run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> "$GITHUB_OUTPUT" - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 diff --git a/.github/workflows/reusable-test-core-build-process.yml b/.github/workflows/reusable-test-core-build-process.yml index 9f818517b624b..3b04129ef88c5 100644 --- a/.github/workflows/reusable-test-core-build-process.yml +++ b/.github/workflows/reusable-test-core-build-process.yml @@ -79,7 +79,7 @@ jobs: - name: Retrieve the pinned Gutenberg SHA value id: gutenberg-pinned-sha - run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> "$GITHUB_OUTPUT" - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 diff --git a/.github/workflows/reusable-test-local-docker-environment-v1.yml b/.github/workflows/reusable-test-local-docker-environment-v1.yml index a4b4b2c2843f4..ef0694d0baac4 100644 --- a/.github/workflows/reusable-test-local-docker-environment-v1.yml +++ b/.github/workflows/reusable-test-local-docker-environment-v1.yml @@ -95,7 +95,7 @@ jobs: - name: Retrieve the pinned Gutenberg SHA value id: gutenberg-pinned-sha - run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT + run: echo "sha=$(jq -r '.gutenberg.ref' package.json)" >> "$GITHUB_OUTPUT" - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 From af4e29a35e919628d9809238ecde5b666c69d3ba Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Wed, 18 Feb 2026 15:26:54 -0500 Subject: [PATCH 06/11] Include build-specific changes in cache key. --- .github/workflows/reusable-build-package.yml | 2 +- .github/workflows/reusable-check-built-files.yml | 2 +- .github/workflows/reusable-coding-standards-javascript.yml | 2 +- .github/workflows/reusable-end-to-end-tests.yml | 2 +- .github/workflows/reusable-javascript-tests.yml | 2 +- .github/workflows/reusable-performance-test-v2.yml | 2 +- .github/workflows/reusable-phpunit-tests-v3.yml | 2 +- .github/workflows/reusable-test-core-build-process.yml | 2 +- .github/workflows/reusable-test-local-docker-environment-v1.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-build-package.yml b/.github/workflows/reusable-build-package.yml index 8c4e0dd287544..6eae4f9f746e2 100644 --- a/.github/workflows/reusable-build-package.yml +++ b/.github/workflows/reusable-build-package.yml @@ -46,7 +46,7 @@ jobs: path: | 'gutenberg' '!gutenberg/node_modules' - key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index df392ab2139cb..a3c8616f8094e 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -53,7 +53,7 @@ jobs: path: | 'gutenberg' '!gutenberg/node_modules' - key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-coding-standards-javascript.yml b/.github/workflows/reusable-coding-standards-javascript.yml index d995a8baa51fc..9f4f58fc17c26 100644 --- a/.github/workflows/reusable-coding-standards-javascript.yml +++ b/.github/workflows/reusable-coding-standards-javascript.yml @@ -51,7 +51,7 @@ jobs: path: | 'gutenberg' '!gutenberg/node_modules' - key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-end-to-end-tests.yml b/.github/workflows/reusable-end-to-end-tests.yml index d7b3fbbb6056d..9be249e86b219 100644 --- a/.github/workflows/reusable-end-to-end-tests.yml +++ b/.github/workflows/reusable-end-to-end-tests.yml @@ -93,7 +93,7 @@ jobs: path: | 'gutenberg' '!gutenberg/node_modules' - key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-javascript-tests.yml b/.github/workflows/reusable-javascript-tests.yml index 9e41964cf88be..9c040f236811c 100644 --- a/.github/workflows/reusable-javascript-tests.yml +++ b/.github/workflows/reusable-javascript-tests.yml @@ -52,7 +52,7 @@ jobs: path: | 'gutenberg' '!gutenberg/node_modules' - key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-performance-test-v2.yml b/.github/workflows/reusable-performance-test-v2.yml index 7cff810cf0176..af0f4ecd804d7 100644 --- a/.github/workflows/reusable-performance-test-v2.yml +++ b/.github/workflows/reusable-performance-test-v2.yml @@ -133,7 +133,7 @@ jobs: path: | 'gutenberg' '!gutenberg/node_modules' - key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index eec4c2edcc8bc..74ef28f4430dd 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -148,7 +148,7 @@ jobs: path: | 'gutenberg' '!gutenberg/node_modules' - key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 diff --git a/.github/workflows/reusable-test-core-build-process.yml b/.github/workflows/reusable-test-core-build-process.yml index 3b04129ef88c5..09d2a02bf82d2 100644 --- a/.github/workflows/reusable-test-core-build-process.yml +++ b/.github/workflows/reusable-test-core-build-process.yml @@ -87,7 +87,7 @@ jobs: path: | 'gutenberg' '!gutenberg/node_modules' - key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} # This date is used to ensure that the PHPCS cache is cleared at least once every week. # http://man7.org/linux/man-pages/man1/date.1.html diff --git a/.github/workflows/reusable-test-local-docker-environment-v1.yml b/.github/workflows/reusable-test-local-docker-environment-v1.yml index ef0694d0baac4..1829c1f8a92d6 100644 --- a/.github/workflows/reusable-test-local-docker-environment-v1.yml +++ b/.github/workflows/reusable-test-local-docker-environment-v1.yml @@ -103,7 +103,7 @@ jobs: path: | 'gutenberg' '!gutenberg/node_modules' - key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha}} + key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 From e6dd184a875a904ae4239865bf42ce60bce6b95a Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Wed, 18 Feb 2026 15:35:38 -0500 Subject: [PATCH 07/11] Remove surrounding quotations from path patterns These are treated as literals instead. --- .github/workflows/reusable-build-package.yml | 4 ++-- .github/workflows/reusable-check-built-files.yml | 4 ++-- .github/workflows/reusable-coding-standards-javascript.yml | 4 ++-- .github/workflows/reusable-end-to-end-tests.yml | 4 ++-- .github/workflows/reusable-javascript-tests.yml | 4 ++-- .github/workflows/reusable-performance-test-v2.yml | 4 ++-- .github/workflows/reusable-phpunit-tests-v3.yml | 4 ++-- .github/workflows/reusable-test-core-build-process.yml | 4 ++-- .../workflows/reusable-test-local-docker-environment-v1.yml | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/reusable-build-package.yml b/.github/workflows/reusable-build-package.yml index 6eae4f9f746e2..4fe4db1db2c06 100644 --- a/.github/workflows/reusable-build-package.yml +++ b/.github/workflows/reusable-build-package.yml @@ -44,8 +44,8 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: | - 'gutenberg' - '!gutenberg/node_modules' + gutenberg + !gutenberg/node_modules key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index a3c8616f8094e..bf27099099bb9 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -51,8 +51,8 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: | - 'gutenberg' - '!gutenberg/node_modules' + gutenberg + !gutenberg/node_modules key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-coding-standards-javascript.yml b/.github/workflows/reusable-coding-standards-javascript.yml index 9f4f58fc17c26..1024a1536191a 100644 --- a/.github/workflows/reusable-coding-standards-javascript.yml +++ b/.github/workflows/reusable-coding-standards-javascript.yml @@ -49,8 +49,8 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: | - 'gutenberg' - '!gutenberg/node_modules' + gutenberg + !gutenberg/node_modules key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-end-to-end-tests.yml b/.github/workflows/reusable-end-to-end-tests.yml index 9be249e86b219..f23fc485a87a8 100644 --- a/.github/workflows/reusable-end-to-end-tests.yml +++ b/.github/workflows/reusable-end-to-end-tests.yml @@ -91,8 +91,8 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: | - 'gutenberg' - '!gutenberg/node_modules' + gutenberg + !gutenberg/node_modules key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-javascript-tests.yml b/.github/workflows/reusable-javascript-tests.yml index 9c040f236811c..6932802df5427 100644 --- a/.github/workflows/reusable-javascript-tests.yml +++ b/.github/workflows/reusable-javascript-tests.yml @@ -50,8 +50,8 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: | - 'gutenberg' - '!gutenberg/node_modules' + gutenberg + !gutenberg/node_modules key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-performance-test-v2.yml b/.github/workflows/reusable-performance-test-v2.yml index af0f4ecd804d7..c383fca4709ba 100644 --- a/.github/workflows/reusable-performance-test-v2.yml +++ b/.github/workflows/reusable-performance-test-v2.yml @@ -131,8 +131,8 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: | - 'gutenberg' - '!gutenberg/node_modules' + gutenberg + !gutenberg/node_modules key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index 74ef28f4430dd..0b64cbe8bde49 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -146,8 +146,8 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: | - 'gutenberg' - '!gutenberg/node_modules' + gutenberg + !gutenberg/node_modules key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-test-core-build-process.yml b/.github/workflows/reusable-test-core-build-process.yml index 09d2a02bf82d2..050d6fa781d7c 100644 --- a/.github/workflows/reusable-test-core-build-process.yml +++ b/.github/workflows/reusable-test-core-build-process.yml @@ -85,8 +85,8 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: | - 'gutenberg' - '!gutenberg/node_modules' + gutenberg + !gutenberg/node_modules key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} # This date is used to ensure that the PHPCS cache is cleared at least once every week. diff --git a/.github/workflows/reusable-test-local-docker-environment-v1.yml b/.github/workflows/reusable-test-local-docker-environment-v1.yml index 1829c1f8a92d6..0ca8c065d2712 100644 --- a/.github/workflows/reusable-test-local-docker-environment-v1.yml +++ b/.github/workflows/reusable-test-local-docker-environment-v1.yml @@ -101,8 +101,8 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: | - 'gutenberg' - '!gutenberg/node_modules' + gutenberg + !gutenberg/node_modules key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js From 6f425be1ae0f00a3b89fa5dd177f746dcd85451d Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Wed, 18 Feb 2026 15:54:00 -0500 Subject: [PATCH 08/11] Add trailing slash to exclude pattern. --- .github/workflows/reusable-build-package.yml | 2 +- .github/workflows/reusable-check-built-files.yml | 2 +- .github/workflows/reusable-coding-standards-javascript.yml | 2 +- .github/workflows/reusable-end-to-end-tests.yml | 2 +- .github/workflows/reusable-javascript-tests.yml | 2 +- .github/workflows/reusable-performance-test-v2.yml | 2 +- .github/workflows/reusable-phpunit-tests-v3.yml | 2 +- .github/workflows/reusable-test-core-build-process.yml | 2 +- .github/workflows/reusable-test-local-docker-environment-v1.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-build-package.yml b/.github/workflows/reusable-build-package.yml index 4fe4db1db2c06..0c13e43995f78 100644 --- a/.github/workflows/reusable-build-package.yml +++ b/.github/workflows/reusable-build-package.yml @@ -45,7 +45,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules + !gutenberg/node_modules/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index bf27099099bb9..ad55a693747a1 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -52,7 +52,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules + !gutenberg/node_modules/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-coding-standards-javascript.yml b/.github/workflows/reusable-coding-standards-javascript.yml index 1024a1536191a..1a2b48511f738 100644 --- a/.github/workflows/reusable-coding-standards-javascript.yml +++ b/.github/workflows/reusable-coding-standards-javascript.yml @@ -50,7 +50,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules + !gutenberg/node_modules/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-end-to-end-tests.yml b/.github/workflows/reusable-end-to-end-tests.yml index f23fc485a87a8..f163311221ea4 100644 --- a/.github/workflows/reusable-end-to-end-tests.yml +++ b/.github/workflows/reusable-end-to-end-tests.yml @@ -92,7 +92,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules + !gutenberg/node_modules/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-javascript-tests.yml b/.github/workflows/reusable-javascript-tests.yml index 6932802df5427..956f4babf7a6e 100644 --- a/.github/workflows/reusable-javascript-tests.yml +++ b/.github/workflows/reusable-javascript-tests.yml @@ -51,7 +51,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules + !gutenberg/node_modules/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-performance-test-v2.yml b/.github/workflows/reusable-performance-test-v2.yml index c383fca4709ba..6ead7794b87c9 100644 --- a/.github/workflows/reusable-performance-test-v2.yml +++ b/.github/workflows/reusable-performance-test-v2.yml @@ -132,7 +132,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules + !gutenberg/node_modules/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index 0b64cbe8bde49..f61f15cc7528f 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -147,7 +147,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules + !gutenberg/node_modules/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-test-core-build-process.yml b/.github/workflows/reusable-test-core-build-process.yml index 050d6fa781d7c..8ad5d800d3864 100644 --- a/.github/workflows/reusable-test-core-build-process.yml +++ b/.github/workflows/reusable-test-core-build-process.yml @@ -86,7 +86,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules + !gutenberg/node_modules/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} # This date is used to ensure that the PHPCS cache is cleared at least once every week. diff --git a/.github/workflows/reusable-test-local-docker-environment-v1.yml b/.github/workflows/reusable-test-local-docker-environment-v1.yml index 0ca8c065d2712..625c78b1cf419 100644 --- a/.github/workflows/reusable-test-local-docker-environment-v1.yml +++ b/.github/workflows/reusable-test-local-docker-environment-v1.yml @@ -102,7 +102,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules + !gutenberg/node_modules/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js From 1a2fa1364520dcbc6d737040de07b40a4370f004 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Wed, 18 Feb 2026 19:51:58 -0500 Subject: [PATCH 09/11] Adjust glob pattern. --- .github/workflows/reusable-build-package.yml | 2 +- .github/workflows/reusable-check-built-files.yml | 2 +- .github/workflows/reusable-coding-standards-javascript.yml | 2 +- .github/workflows/reusable-end-to-end-tests.yml | 2 +- .github/workflows/reusable-javascript-tests.yml | 2 +- .github/workflows/reusable-performance-test-v2.yml | 2 +- .github/workflows/reusable-phpunit-tests-v3.yml | 2 +- .github/workflows/reusable-test-core-build-process.yml | 2 +- .github/workflows/reusable-test-local-docker-environment-v1.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-build-package.yml b/.github/workflows/reusable-build-package.yml index 0c13e43995f78..04d1c60bef6c2 100644 --- a/.github/workflows/reusable-build-package.yml +++ b/.github/workflows/reusable-build-package.yml @@ -45,7 +45,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules/ + !gutenberg/node_modules/**/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index ad55a693747a1..7472b462c2208 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -52,7 +52,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules/ + !gutenberg/node_modules/**/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-coding-standards-javascript.yml b/.github/workflows/reusable-coding-standards-javascript.yml index 1a2b48511f738..0157a0247fe6a 100644 --- a/.github/workflows/reusable-coding-standards-javascript.yml +++ b/.github/workflows/reusable-coding-standards-javascript.yml @@ -50,7 +50,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules/ + !gutenberg/node_modules/**/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-end-to-end-tests.yml b/.github/workflows/reusable-end-to-end-tests.yml index f163311221ea4..c0fef86e9f5c6 100644 --- a/.github/workflows/reusable-end-to-end-tests.yml +++ b/.github/workflows/reusable-end-to-end-tests.yml @@ -92,7 +92,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules/ + !gutenberg/node_modules/**/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-javascript-tests.yml b/.github/workflows/reusable-javascript-tests.yml index 956f4babf7a6e..9472e85d05927 100644 --- a/.github/workflows/reusable-javascript-tests.yml +++ b/.github/workflows/reusable-javascript-tests.yml @@ -51,7 +51,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules/ + !gutenberg/node_modules/**/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-performance-test-v2.yml b/.github/workflows/reusable-performance-test-v2.yml index 6ead7794b87c9..78df093a35830 100644 --- a/.github/workflows/reusable-performance-test-v2.yml +++ b/.github/workflows/reusable-performance-test-v2.yml @@ -132,7 +132,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules/ + !gutenberg/node_modules/**/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index f61f15cc7528f..4b8be63e79347 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -147,7 +147,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules/ + !gutenberg/node_modules/**/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js diff --git a/.github/workflows/reusable-test-core-build-process.yml b/.github/workflows/reusable-test-core-build-process.yml index 8ad5d800d3864..0efd51cf60d83 100644 --- a/.github/workflows/reusable-test-core-build-process.yml +++ b/.github/workflows/reusable-test-core-build-process.yml @@ -86,7 +86,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules/ + !gutenberg/node_modules/**/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} # This date is used to ensure that the PHPCS cache is cleared at least once every week. diff --git a/.github/workflows/reusable-test-local-docker-environment-v1.yml b/.github/workflows/reusable-test-local-docker-environment-v1.yml index 625c78b1cf419..863c9a750aeb8 100644 --- a/.github/workflows/reusable-test-local-docker-environment-v1.yml +++ b/.github/workflows/reusable-test-local-docker-environment-v1.yml @@ -102,7 +102,7 @@ jobs: with: path: | gutenberg - !gutenberg/node_modules/ + !gutenberg/node_modules/**/ key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js From 32bc588336330d16353c9ad5750ad9becfb98013 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Wed, 18 Feb 2026 20:05:35 -0500 Subject: [PATCH 10/11] Remove exclusion pattern. Apparently exclusions do not work for actions/cache and this is a known issue. See https://github.com/actions/cache/issues/1356. Instead, this manually removes the `node_modules` directory to see what effect that has on the cache. --- .github/workflows/reusable-build-package.yml | 7 ++++--- .github/workflows/reusable-check-built-files.yml | 7 ++++--- .github/workflows/reusable-coding-standards-javascript.yml | 7 ++++--- .github/workflows/reusable-end-to-end-tests.yml | 7 ++++--- .github/workflows/reusable-javascript-tests.yml | 7 ++++--- .github/workflows/reusable-performance-test-v2.yml | 7 ++++--- .github/workflows/reusable-phpunit-tests-v3.yml | 7 ++++--- .github/workflows/reusable-test-core-build-process.yml | 7 ++++--- .../reusable-test-local-docker-environment-v1.yml | 7 ++++--- 9 files changed, 36 insertions(+), 27 deletions(-) diff --git a/.github/workflows/reusable-build-package.yml b/.github/workflows/reusable-build-package.yml index 04d1c60bef6c2..471b21bf9e2ec 100644 --- a/.github/workflows/reusable-build-package.yml +++ b/.github/workflows/reusable-build-package.yml @@ -43,9 +43,7 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: | - gutenberg - !gutenberg/node_modules/**/ + path: gutenberg key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js @@ -72,3 +70,6 @@ jobs: name: wordpress-develop path: develop.zip if-no-files-found: error + + - name: Clean up node_modules directory + run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index 7472b462c2208..f36ac53aecf15 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -50,9 +50,7 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: | - gutenberg - !gutenberg/node_modules/**/ + path: gutenberg key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js @@ -122,3 +120,6 @@ jobs: with: name: pr-built-file-changes path: changes.diff + + - name: Clean up node_modules directory + run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-coding-standards-javascript.yml b/.github/workflows/reusable-coding-standards-javascript.yml index 0157a0247fe6a..978aef4b98bb6 100644 --- a/.github/workflows/reusable-coding-standards-javascript.yml +++ b/.github/workflows/reusable-coding-standards-javascript.yml @@ -48,9 +48,7 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: | - gutenberg - !gutenberg/node_modules/**/ + path: gutenberg key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js @@ -73,3 +71,6 @@ jobs: - name: Ensure version-controlled files are not modified or deleted run: git diff --exit-code + + - name: Clean up node_modules directory + run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-end-to-end-tests.yml b/.github/workflows/reusable-end-to-end-tests.yml index c0fef86e9f5c6..84668396b50ec 100644 --- a/.github/workflows/reusable-end-to-end-tests.yml +++ b/.github/workflows/reusable-end-to-end-tests.yml @@ -90,9 +90,7 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: | - gutenberg - !gutenberg/node_modules/**/ + path: gutenberg key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js @@ -169,3 +167,6 @@ jobs: - name: Ensure version-controlled files are not modified or deleted run: git diff --exit-code + + - name: Clean up node_modules directory + run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-javascript-tests.yml b/.github/workflows/reusable-javascript-tests.yml index 9472e85d05927..f046ef9fb5c0d 100644 --- a/.github/workflows/reusable-javascript-tests.yml +++ b/.github/workflows/reusable-javascript-tests.yml @@ -49,9 +49,7 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: | - gutenberg - !gutenberg/node_modules/**/ + path: gutenberg key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js @@ -83,3 +81,6 @@ jobs: - name: Ensure version-controlled files are not modified or deleted run: git diff --exit-code + + - name: Clean up node_modules directory + run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-performance-test-v2.yml b/.github/workflows/reusable-performance-test-v2.yml index 78df093a35830..7c23a4740ccfc 100644 --- a/.github/workflows/reusable-performance-test-v2.yml +++ b/.github/workflows/reusable-performance-test-v2.yml @@ -130,9 +130,7 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: | - gutenberg - !gutenberg/node_modules/**/ + path: gutenberg key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js @@ -282,3 +280,6 @@ jobs: - name: Ensure version-controlled files are not modified or deleted run: git diff --exit-code + + - name: Clean up node_modules directory + run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index 4b8be63e79347..d519b3dc4e868 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -145,9 +145,7 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: | - gutenberg - !gutenberg/node_modules/**/ + path: gutenberg key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js @@ -283,3 +281,6 @@ jobs: env: WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}" run: docker compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php + + - name: Clean up node_modules directory + run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-test-core-build-process.yml b/.github/workflows/reusable-test-core-build-process.yml index 0efd51cf60d83..25bdde7fc4b85 100644 --- a/.github/workflows/reusable-test-core-build-process.yml +++ b/.github/workflows/reusable-test-core-build-process.yml @@ -84,9 +84,7 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: | - gutenberg - !gutenberg/node_modules/**/ + path: gutenberg key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} # This date is used to ensure that the PHPCS cache is cleared at least once every week. @@ -170,3 +168,6 @@ jobs: with: name: pr-number path: pr-number/ + + - name: Clean up node_modules directory + run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-test-local-docker-environment-v1.yml b/.github/workflows/reusable-test-local-docker-environment-v1.yml index 863c9a750aeb8..cf5775f18770b 100644 --- a/.github/workflows/reusable-test-local-docker-environment-v1.yml +++ b/.github/workflows/reusable-test-local-docker-environment-v1.yml @@ -100,9 +100,7 @@ jobs: - name: Configure caching for Gutenberg directory. uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: | - gutenberg - !gutenberg/node_modules/**/ + path: gutenberg key: gutenberg-${{ steps.gutenberg-pinned-sha.outputs.sha }}-${{ hashFiles( 'tools/gutenberg/*', 'package*.json', 'Gruntfile.js' ) }} - name: Set up Node.js @@ -182,3 +180,6 @@ jobs: - name: Ensure version-controlled files are not modified or deleted run: git diff --exit-code + + - name: Clean up node_modules directory + run: rm -rf gutenberg/node_modules From 40bcc92e417f22e483f9a6987746474e152fd5aa Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Wed, 18 Feb 2026 20:15:44 -0500 Subject: [PATCH 11/11] Leave `node_modules` Excluding this from the cache did not speed things up. --- .github/workflows/reusable-build-package.yml | 3 --- .github/workflows/reusable-check-built-files.yml | 3 --- .github/workflows/reusable-coding-standards-javascript.yml | 3 --- .github/workflows/reusable-end-to-end-tests.yml | 3 --- .github/workflows/reusable-javascript-tests.yml | 3 --- .github/workflows/reusable-performance-test-v2.yml | 3 --- .github/workflows/reusable-phpunit-tests-v3.yml | 3 --- .github/workflows/reusable-test-core-build-process.yml | 3 --- .../workflows/reusable-test-local-docker-environment-v1.yml | 3 --- 9 files changed, 27 deletions(-) diff --git a/.github/workflows/reusable-build-package.yml b/.github/workflows/reusable-build-package.yml index 471b21bf9e2ec..6ee00003841ad 100644 --- a/.github/workflows/reusable-build-package.yml +++ b/.github/workflows/reusable-build-package.yml @@ -70,6 +70,3 @@ jobs: name: wordpress-develop path: develop.zip if-no-files-found: error - - - name: Clean up node_modules directory - run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index f36ac53aecf15..eb8607ee93ccf 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -120,6 +120,3 @@ jobs: with: name: pr-built-file-changes path: changes.diff - - - name: Clean up node_modules directory - run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-coding-standards-javascript.yml b/.github/workflows/reusable-coding-standards-javascript.yml index 978aef4b98bb6..e2a5f8619d20b 100644 --- a/.github/workflows/reusable-coding-standards-javascript.yml +++ b/.github/workflows/reusable-coding-standards-javascript.yml @@ -71,6 +71,3 @@ jobs: - name: Ensure version-controlled files are not modified or deleted run: git diff --exit-code - - - name: Clean up node_modules directory - run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-end-to-end-tests.yml b/.github/workflows/reusable-end-to-end-tests.yml index 84668396b50ec..337f08908beb2 100644 --- a/.github/workflows/reusable-end-to-end-tests.yml +++ b/.github/workflows/reusable-end-to-end-tests.yml @@ -167,6 +167,3 @@ jobs: - name: Ensure version-controlled files are not modified or deleted run: git diff --exit-code - - - name: Clean up node_modules directory - run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-javascript-tests.yml b/.github/workflows/reusable-javascript-tests.yml index f046ef9fb5c0d..4e81907cdb9ea 100644 --- a/.github/workflows/reusable-javascript-tests.yml +++ b/.github/workflows/reusable-javascript-tests.yml @@ -81,6 +81,3 @@ jobs: - name: Ensure version-controlled files are not modified or deleted run: git diff --exit-code - - - name: Clean up node_modules directory - run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-performance-test-v2.yml b/.github/workflows/reusable-performance-test-v2.yml index 7c23a4740ccfc..ff09ced922248 100644 --- a/.github/workflows/reusable-performance-test-v2.yml +++ b/.github/workflows/reusable-performance-test-v2.yml @@ -280,6 +280,3 @@ jobs: - name: Ensure version-controlled files are not modified or deleted run: git diff --exit-code - - - name: Clean up node_modules directory - run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index d519b3dc4e868..c63e0d578d408 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -281,6 +281,3 @@ jobs: env: WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}" run: docker compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php - - - name: Clean up node_modules directory - run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-test-core-build-process.yml b/.github/workflows/reusable-test-core-build-process.yml index 25bdde7fc4b85..f5244984cd6a8 100644 --- a/.github/workflows/reusable-test-core-build-process.yml +++ b/.github/workflows/reusable-test-core-build-process.yml @@ -168,6 +168,3 @@ jobs: with: name: pr-number path: pr-number/ - - - name: Clean up node_modules directory - run: rm -rf gutenberg/node_modules diff --git a/.github/workflows/reusable-test-local-docker-environment-v1.yml b/.github/workflows/reusable-test-local-docker-environment-v1.yml index cf5775f18770b..ef52f2f00d5ee 100644 --- a/.github/workflows/reusable-test-local-docker-environment-v1.yml +++ b/.github/workflows/reusable-test-local-docker-environment-v1.yml @@ -180,6 +180,3 @@ jobs: - name: Ensure version-controlled files are not modified or deleted run: git diff --exit-code - - - name: Clean up node_modules directory - run: rm -rf gutenberg/node_modules