fix(ci): disable package-manager-cache on skip-install setup-node
actions/setup-node@v5 defaults package-manager-cache:true, so the agent-browser pack fixture still registered a pnpm store path and failed post-job with Path Validation Error after a successful pack/upload. Explicitly set package-manager-cache:false when skip-install is true.
This commit is contained in:
8
.github/actions/setup-node-pnpm/action.yml
vendored
8
.github/actions/setup-node-pnpm/action.yml
vendored
@@ -39,6 +39,13 @@ runs:
|
||||
# "Path Validation Error: Path(s) specified in the action for caching do(es)
|
||||
# not exist" and marks an otherwise-successful pack job failed. Only enable
|
||||
# the pnpm store cache when this composite will actually install.
|
||||
#
|
||||
# FNXC:CI 2026-08-03-06:26:
|
||||
# Omitting `cache: pnpm` is NOT enough on actions/setup-node@v5+: the default
|
||||
# `package-manager-cache: true` still auto-detects the workspace lockfile, registers
|
||||
# the pnpm store path for post-job save, and red-X's skip-install jobs after a green
|
||||
# pack (agent-browser-install pack-fixture on PR #3307). Explicitly disable it on the
|
||||
# no-install path; keep the install path on the explicit `cache: pnpm` contract.
|
||||
- name: Setup Node.js
|
||||
if: ${{ inputs.skip-install != 'true' }}
|
||||
uses: actions/setup-node@v5
|
||||
@@ -52,6 +59,7 @@ runs:
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
package-manager-cache: false
|
||||
registry-url: ${{ inputs.registry-url }}
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
@@ -264,6 +264,11 @@ describe("Merge gate (.github/workflows/pr-checks.yml)", () => {
|
||||
skip-install pack jobs never create a pnpm store; setup-node must not enable
|
||||
cache: pnpm on that path or post-job cache save fails the whole job after a
|
||||
successful pack (agent-browser-install pack-fixture).
|
||||
|
||||
FNXC:CI 2026-08-03-06:26:
|
||||
setup-node@v5+ also defaults package-manager-cache:true, which reintroduces the
|
||||
same Path Validation Error even when cache is omitted — pin it false on the
|
||||
no-install path (PR #3307 agent-browser pack fixture post-step).
|
||||
*/
|
||||
it("disables pnpm store cache when skip-install is true", () => {
|
||||
const setupSteps = (compositeAction.runs?.steps ?? []).filter(
|
||||
@@ -276,6 +281,7 @@ describe("Merge gate (.github/workflows/pr-checks.yml)", () => {
|
||||
expect(withoutCache?.if).toContain("skip-install");
|
||||
expect(withoutCache?.if).toContain("==");
|
||||
expect(withoutCache?.with?.cache).toBeUndefined();
|
||||
expect(withoutCache?.with?.["package-manager-cache"]).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps lint as install + lint only, without Bun/setup build coupling", () => {
|
||||
|
||||
Reference in New Issue
Block a user