cypress-io / circleci-orb

Install, cache and run Cypress.io tests on CircleCI with minimal configuration.
https://circleci.com/orbs/registry/orb/cypress-io/cypress
MIT License
160 stars 101 forks source link

Allow choice of `node-version` with `cypress/run` job #475

Open MikeMcC399 opened 2 months ago

MikeMcC399 commented 2 months ago

What would you like?

Add a parameter node-version to the job cypress/run to allow selection of a Node.js release or describe how to set the Node.js version without needing an extra parameter.

Why is this needed?

cypress/run provides a convenient way to run Cypress tests. It is essential to be able to specify which version of Node.js is used. Many npm modules, which are configured together with Cypress tests, have exact restrictions on which Node.js versions they may be run with. The default executor defined by the Cypress CircleCI Orb may not work:

https://github.com/cypress-io/circleci-orb/blob/d555dd3e2231796e937dee2491c258dcc6c0c071/src/executors/default.yml#L6

Other

related to issues

According to the example, node-version is available for use with the command cypress/run-tests and is not mentioned for use with the job cypress/run:

https://github.com/cypress-io/circleci-orb/blob/d555dd3e2231796e937dee2491c258dcc6c0c071/src/examples/node-version.yml#L1-L22