-
Notifications
You must be signed in to change notification settings - Fork 360
Description
Current behavior
-
The example directory examples/env uses the Cypress.env() API call to get environment variables in tests. These are non-secret environment variables. The related workflow example-env.yml refers to this usage in comments.
-
PR feat: add
cy.env(),allowCypressEnv, and deprecateCypress.env()cypress#33181 indicates that Cypress plans to deprecate Cypress.env() and introducecy.env()in a future release.
Desired behavior
- Follow developments in Cypress and migrate usage of Cypress.env() as appropriate, and at an appropriate time, to avoid demonstrating any deprecated API usage and instead demonstrate handling environment variables according to updated recommendations.
Migrating the examples in this repo to use new API functions that are only available in Cypress >=15.10.0 would mean that the examples would no longer be compatible with earlier Cypress versions. Effectively the use of new API functions from Cypress >= 15.10.0 would be a breaking change in this repo.
I suggest to delay any related updates here until Cypress 16 is available.
The new API can be demonstrated in https://github.com/cypress-io/cypress-example-kitchensink, where GitHub Actions examples workflows are also available.