From 2fd23cdf08069cb5f1aff75baca5d4f60c4e5c4a Mon Sep 17 00:00:00 2001 From: Sil Date: Wed, 30 Sep 2026 20:41:39 +0200 Subject: [PATCH 1/2] Speed up the organization check Corepack replaces pnpm/action-setup and node_modules is cached per lockfile, so later pushes to a pull request skip the install. Measured on silveltman and finetics: 27s and 39s instead of 40s and 58s with a warm cache. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/check.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 61ffa2a..50c6d30 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -32,16 +32,24 @@ jobs: echo "No pnpm project with a check script. Nothing to run." fi - - if: steps.scripts.outputs.run == 'true' - uses: pnpm/action-setup@v6 - - if: steps.scripts.outputs.run == 'true' uses: actions/setup-node@v6 with: node-version: 24 - cache: pnpm + # Corepack starts the pnpm version from `packageManager` faster than pnpm/action-setup. + - if: steps.scripts.outputs.run == 'true' + run: corepack enable + + # Later pushes to the same pull request skip the install. - if: steps.scripts.outputs.run == 'true' + id: modules + uses: actions/cache@v6 + with: + path: node_modules + key: modules-${{ runner.os }}-node24-${{ hashFiles('pnpm-lock.yaml') }} + + - if: steps.scripts.outputs.run == 'true' && steps.modules.outputs.cache-hit != 'true' run: pnpm install --frozen-lockfile --ignore-scripts - if: steps.scripts.outputs.run == 'true' From d90f516da21d4d13e37600224d9a3ab354b8c5ad Mon Sep 17 00:00:00 2001 From: Sil Date: Wed, 30 Sep 2026 21:51:19 +0200 Subject: [PATCH 2/2] Invalidate the module cache when a manifest changes Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 50c6d30..c9c2aa5 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -41,13 +41,13 @@ jobs: - if: steps.scripts.outputs.run == 'true' run: corepack enable - # Later pushes to the same pull request skip the install. + # Later pushes to the same pull request skip the install while dependencies are unchanged. - if: steps.scripts.outputs.run == 'true' id: modules uses: actions/cache@v6 with: path: node_modules - key: modules-${{ runner.os }}-node24-${{ hashFiles('pnpm-lock.yaml') }} + key: modules-${{ runner.os }}-node24-${{ hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', '**/package.json') }} - if: steps.scripts.outputs.run == 'true' && steps.modules.outputs.cache-hit != 'true' run: pnpm install --frozen-lockfile --ignore-scripts