@@ -141,8 +141,8 @@ jobs:
141141
142142 runtime-from-devengines :
143143 # No `runtime` input — the action should pick up devEngines.runtime from
144- # package.json and install it. Also asserts that `pnpm install` runs by
145- # default when a manifest is present .
144+ # package.json and install it. A subsequent caller-driven `pnpm install`
145+ # then resolves dependencies against that runtime .
146146 name : ' Runtime from devEngines.runtime'
147147 runs-on : ubuntu-latest
148148 steps :
@@ -169,6 +169,10 @@ jobs:
169169 - id : pnpm
170170 uses : ./
171171
172+ - name : pnpm install
173+ run : pnpm install
174+ shell : bash
175+
172176 - name : ' Test: node 22 is installed and dependencies are resolved'
173177 env :
174178 OUT_NAME : ${{ steps.pnpm.outputs.runtime-name }}
@@ -190,7 +194,6 @@ jobs:
190194 echo "Expected outputs.runtime-version=^22.0.0, got ${OUT_VERSION}"
191195 exit 1
192196 fi
193- # `pnpm install` should have run automatically — node_modules must exist.
194197 if [ ! -d node_modules/is-odd ]; then
195198 echo "Expected pnpm install to have populated node_modules/is-odd"
196199 exit 1
@@ -199,9 +202,10 @@ jobs:
199202
200203 runtime-overrides-devengines :
201204 # Explicit `runtime` input conflicts with `devEngines.runtime` in
202- # package.json. The action should install the explicit version AND pass
203- # `--no-runtime` to pnpm install so the devEngines runtime doesn't shadow
204- # the matrix one. Requires pnpm >= 11.1.0.
205+ # package.json. The action installs the explicit version. The caller is
206+ # responsible for passing `--no-runtime` to `pnpm install` so the
207+ # devEngines runtime doesn't shadow the explicit one. Requires pnpm
208+ # >= 11.1.0.
205209 name : ' Explicit runtime overrides devEngines.runtime'
206210 runs-on : ubuntu-latest
207211 steps :
@@ -228,6 +232,10 @@ jobs:
228232 with :
229233 runtime : node@22
230234
235+ - name : pnpm install --no-runtime
236+ run : pnpm install --no-runtime
237+ shell : bash
238+
231239 - name : ' Test: node 22 stays active after pnpm install'
232240 run : |
233241 set -e
@@ -237,7 +245,6 @@ jobs:
237245 v22.*) ;;
238246 *) echo "Expected node v22.x after install (--no-runtime should have suppressed the devEngines runtime fetch), got ${actual}"; exit 1 ;;
239247 esac
240- # pnpm install should still have run.
241248 if [ ! -d node_modules/is-odd ]; then
242249 echo "Expected pnpm install to have populated node_modules/is-odd"
243250 exit 1
@@ -283,8 +290,7 @@ jobs:
283290
284291 no-runtime :
285292 # No runtime input, no devEngines.runtime. Action installs pnpm only and
286- # leaves the runtime outputs empty. With no package.json, `pnpm install`
287- # is also skipped.
293+ # leaves the runtime outputs empty.
288294 name : ' No runtime, no manifest'
289295 runs-on : ubuntu-latest
290296 steps :
0 commit comments