diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index d1a13c2..0bd815b 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -31,6 +31,16 @@ on: type: string required: false default: "." + cache-dependency-path: + description: >- + Forwarded to actions/setup-node's `cache-dependency-path`. + Required when the lockfile lives outside the repo root + (e.g. `src/Web/package-lock.json` in a polyglot repo). + Default empty — setup-node falls back to repo-root detection, + matching the prior behaviour for consumers that don't set it. + type: string + required: false + default: "" install-cmd: description: Override install command. Empty = pm default. type: string @@ -93,6 +103,7 @@ jobs: with: node-version: ${{ inputs.node-version }} cache: ${{ inputs.package-manager == 'yarn' && 'yarn' || inputs.package-manager == 'pnpm' && 'pnpm' || 'npm' }} + cache-dependency-path: ${{ inputs.cache-dependency-path }} - name: Install env: diff --git a/.github/workflows/required.yml b/.github/workflows/required.yml index d234d5e..ae1c8a9 100644 --- a/.github/workflows/required.yml +++ b/.github/workflows/required.yml @@ -56,6 +56,16 @@ on: type: string required: false default: "" + node-cache-dependency-path: + description: >- + Forwarded to node-ci.yml → actions/setup-node. Polyglot repos + whose lockfile lives in a subdirectory (e.g. viz's + `src/ResQ.Viz.Web/package-lock.json`) must set this, else + setup-node errors with "Dependencies lock file is not found". + Default empty = root-level detection (matches prior behaviour). + type: string + required: false + default: "" rust-run-coverage: type: boolean required: false @@ -165,6 +175,7 @@ jobs: typecheck-cmd: ${{ inputs.node-typecheck-cmd }} test-cmd: ${{ inputs.node-test-cmd }} build-cmd: ${{ inputs.node-build-cmd }} + cache-dependency-path: ${{ inputs.node-cache-dependency-path }} dotnet: needs: [validate-lang]