Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release github-action for Node.js node20 #968

Closed
MikeMcC399 opened this issue Jul 18, 2023 · 7 comments · Fixed by #995
Closed

Release github-action for Node.js node20 #968

MikeMcC399 opened this issue Jul 18, 2023 · 7 comments · Fixed by #995
Labels

Comments

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Jul 18, 2023

This is an enhancement request for Cypress github-action.

GitHub has now provided support for node20 in their JavaScript Actions environment. See actions/runner#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 actions/runner#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 actions/runner#2704 Jul 19, 2023.
Updated again on Aug 15, 2023 based on actions/runner#2619 (comment).
Further update Aug 17, 2023.

@MikeMcC399

This comment was marked as outdated.

@MikeMcC399

This comment was marked as outdated.

@MikeMcC399 MikeMcC399 changed the title Release github-action for Node.js after node16 Release github-action for Node.js node20 Jul 19, 2023
@nagash77 nagash77 added type: enhancement New feature or request E2E labels Aug 3, 2023
@MikeMcC399
Copy link
Collaborator Author

GitHub has announced that GitHub runner release v2.308.0 includes support for node20 and that roll-out has started. This should allow the implementation of this feature request once the rollout has completed.

@MikeMcC399
Copy link
Collaborator Author

@github-actions
Copy link

🎉 This issue has been resolved in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@AtofStryker
Copy link
Contributor

@MikeMcC399 looks like it worked!

@MikeMcC399
Copy link
Collaborator Author

@ricardo-dematos

cypress-io/github-action@v6 is now available and runs natively under Node.js 20. You may like to try it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants