From 645d9855f3e967deffc7c00eadf77a13ba8d1b37 Mon Sep 17 00:00:00 2001 From: Bryan Fawcett Date: Sat, 3 Oct 2026 02:17:20 +0800 Subject: [PATCH] ci: stop setup-node caching in the tool-only lint and fmt jobs prettier, markdownlint and vite-plus / fmt use Node only to run a tool installed into a temp prefix. setup-node v5+ turns its npm cache on when package.json pins packageManager to npm, and fails when the repo has no lockfile ("Dependencies lock file is not found"). Pinning packageManager is part of the Vite+ adoption, so lockfile-less repos (api-gateway, demo-repository, Paynow-NodeJS-SDK) failed all three. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq --- .github/workflows/reusable-lint.yml | 12 ++++++++++++ .github/workflows/reusable-vite-plus.yml | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/reusable-lint.yml b/.github/workflows/reusable-lint.yml index b1a7cf1..a87c056 100644 --- a/.github/workflows/reusable-lint.yml +++ b/.github/workflows/reusable-lint.yml @@ -410,6 +410,12 @@ jobs: - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: '24' + # Node is only a runtime for a globally installed tool here; the + # repo's dependencies are never installed. Without this, a repo + # whose package.json pins packageManager to npm but has no + # lockfile fails the job: setup-node turns on its npm cache and + # finds nothing to key it on. + package-manager-cache: false - name: Install prettier env: PRETTIER_VERSION: ${{ inputs.prettier-version }} @@ -529,6 +535,12 @@ jobs: - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: '24' + # Node is only a runtime for a globally installed tool here; the + # repo's dependencies are never installed. Without this, a repo + # whose package.json pins packageManager to npm but has no + # lockfile fails the job: setup-node turns on its npm cache and + # finds nothing to key it on. + package-manager-cache: false - name: Install markdownlint-cli2 # Deliberately NOT markdownlint-cli2-action. The action pins its # own bundled markdownlint-cli2, so bumping the action changed the diff --git a/.github/workflows/reusable-vite-plus.yml b/.github/workflows/reusable-vite-plus.yml index 4322957..fc92771 100644 --- a/.github/workflows/reusable-vite-plus.yml +++ b/.github/workflows/reusable-vite-plus.yml @@ -237,6 +237,12 @@ jobs: - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: '24' + # Node is only a runtime for a globally installed tool here; the + # repo's dependencies are never installed. Without this, a repo + # whose package.json pins packageManager to npm but has no + # lockfile fails the job: setup-node turns on its npm cache and + # finds nothing to key it on. + package-manager-cache: false - name: Install the oxfmt that Vite+ bundles id: install env: