chore: add debug output of node.js version #1417
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Situation
If Cypress fails to run using the Module API, for instance due to an issue with the Cypress config file, which was the case with issue #1408, no information about the version of Node.js being used is logged.
The action selects the Node.js major version through the setting for runs.using:
cypress-io/github-action@v6
selects:github-action/action.yml
Lines 102 to 104 in 4b97333
Based on the runs.using setting, GitHub Actions runner takes the value of Node.js from https://github.com/actions/runner/blob/main/src/Misc/externals.sh
GitHub Actions runner v2.323.0 is set to:
Currently only
node20
is allowed forruns.using
.This version of Node.js is separate from the one provided by the GitHub Runner image default Node.js version, for example, currently windows-2025 sets its default to Node.js
22.14.0
. It is also separate from and uninfluenced by any alternate Node.js version that might be installed into the runner using actions/setup-node.Change
Expose Node.js process.version in the debug log when calling the Cypress Module API.
The debug log command outputs the Node.js value if the
DEBUG
environment variable is set as follows:see Debugging.
Verification
View workflow log workflows/example-debug.yml, job
action-debug
, stepCypress action debug logs
and confirm that the Node.js version is displayed, similar to the following: