This is an enhancement request for Cypress github-action.
GitHub has now provided support for node20 in their JavaScript Actions environment. See https://github.com/actions/runner/discussions/2704.
What would you like?
A new major version of the Cypress github-action should be released using GitHub's support for Node.js 20 in GitHub JavaScript Actions.
Why is this needed?
Cypress needs to be able to run using Node.js 20 and not be restricted to Node.js 16.
Node.js 16 reaches end-of-life on Sep 11, 2023.
From within github-action, the full functionality of Cypress together with Cypress Cloud integration and test summaries is only available when Cypress is called by github-action using the Cypress Module API. This is the default way that the github-action calls Cypress since the release of github-action@v2. Cypress is called in the context of GitHub's runs.using for JavaScript Actions currently available only as node16.
Other
This enhancement request has a critical dependency on an update to the runs.using for JavaScript Actions environment being provided by GitHub through their actions/runner.
See https://github.com/actions/runner/discussions/2704 for announcement on the availability of node20 support:
From here, we plan to skip over node 18 and hop on the node 20 LTS release. We are currently working on a date to rollout node 20 and have work in-flight to accomplish this. We will update this discussion in the coming weeks with our plans once we finalize them.
Workarounds
-
The Custom test command option command of github-action can be used to call Cypress from the context of the Node.js version set up in the GitHub runner, for instance using actions/setup-node setting Node.js to 18 or 20, however this usage bypasses many other functions of github-action. It causes many of the other github-action options to be ignored and prevents return of detailed results information from the Cypress run, such as the test summary and resultsUrl. Using command is therefore not a good long-term option.
-
An alternative to using the Cypress JavaScript Action github-action is to call Cypress from a GitHub workflow directly using run, with the same disadvantage as above.
-
A further alternative is to call the Cypress Module API from a custom script written in JavaScript and called from a custom GitHub Actions workflow. This can be used in a simple way or the full results can be used and processed as needed.
Edit: Above text edited based on information in https://github.com/actions/runner/discussions/2704 Jul 19, 2023.
Updated again on Aug 15, 2023 based on actions/runner#2619 (comment).
Further update Aug 17, 2023.
This is an enhancement request for Cypress
github-action.GitHub has now provided support for
node20in their JavaScript Actions environment. See https://github.com/actions/runner/discussions/2704.What would you like?
A new major version of the Cypress
github-actionshould be released using GitHub's support for Node.js20in GitHub JavaScript Actions.Why is this needed?
Cypress needs to be able to run using Node.js
20and not be restricted to Node.js16.Node.js
16reaches end-of-life on Sep 11, 2023.From within
github-action, the full functionality of Cypress together with Cypress Cloud integration and test summaries is only available when Cypress is called bygithub-actionusing the Cypress Module API. This is the default way that thegithub-actioncalls Cypress since the release ofgithub-action@v2. Cypress is called in the context of GitHub'sruns.usingfor JavaScript Actions currently available only asnode16.Other
This enhancement request has a critical dependency on an update to the
runs.usingfor JavaScript Actions environment being provided by GitHub through their actions/runner.See https://github.com/actions/runner/discussions/2704 for announcement on the availability of
node20support:Workarounds
The Custom test command option
commandofgithub-actioncan be used to call Cypress from the context of the Node.js version set up in the GitHub runner, for instance using actions/setup-node setting Node.js to18or20, however this usage bypasses many other functions ofgithub-action. It causes many of the othergithub-actionoptions to be ignored and prevents return of detailed results information from the Cypress run, such as the test summary andresultsUrl. Usingcommandis therefore not a good long-term option.An alternative to using the Cypress JavaScript Action
github-actionis to call Cypress from a GitHub workflow directly usingrun, with the same disadvantage as above.A further alternative is to call the Cypress Module API from a custom script written in JavaScript and called from a custom GitHub Actions workflow. This can be used in a simple way or the full results can be used and processed as needed.
Edit: Above text edited based on information in https://github.com/actions/runner/discussions/2704 Jul 19, 2023.
Updated again on Aug 15, 2023 based on actions/runner#2619 (comment).
Further update Aug 17, 2023.