cypress-io / cypress-io/github-action

Cypress.env deprecation / cy.env addition

Open
#1,620 8 comments 0 reactions 1 assignee Claimed by @MikeMcC399 View on GitHub
tests type: enhancement
Dominant language
JavaScript
Stars
1.5k
Forks
353
Avg merge
1d 22h
Merged PRs (30d)
27

Description

## Current behavior

- The example directory [examples/env](https://github.com/cypress-io/github-action/tree/master/examples/env) uses the [Cypress.env()](https://docs.cypress.io/api/cypress-api/env) API call to get environment variables in tests. These are non-secret environment variables. The related workflow [example-env.yml](https://github.com/cypress-io/github-action/blob/master/.github/workflows/example-env.yml) refers to this usage in comments.

- PR https://github.com/cypress-io/cypress/pull/33181 indicates that Cypress plans to deprecate [Cypress.env()](https://docs.cypress.io/api/cypress-api/env) and introduce `cy.env()` in a future release.

## Desired behavior

- Follow developments in Cypress and migrate usage of [Cypress.env()](https://docs.cypress.io/api/cypress-api/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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.