Skip to content

test: restrict example/env to Cypress <15.10 - #1888

Open
MikeMcC399 wants to merge 1 commit into
cypress-io:masterfrom
MikeMcC399:example-env-pre-15.10
Open

test: restrict example/env to Cypress <15.10#1888
MikeMcC399 wants to merge 1 commit into
cypress-io:masterfrom
MikeMcC399:example-env-pre-15.10

Conversation

@MikeMcC399

@MikeMcC399 MikeMcC399 commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

PREREQUISITE FOR CYPRESS 16 UPGRADE

Situation

Assessment

The env examples are still relevant for action users that have not upgraded to minimum Cypress 15.10. They are however incompatible with Cypress 16 and block upgrading the repo.

env continues to be available for GitHub Actions workflows for both secret and non-secret variables. Preserving various examples using env is therefore helpful for understanding how to use variables.

Change

Skip the tests in examples/env for Cypress >=15.10.0

Update code inline comments and documentation accordingly.

Verification

cd examples/env
npm install cypress@15.9.0
export CYPRESS_environmentName=staging CYPRESS_apiPort=4222 CYPRESS_host=http://api.dev.local
npm test
npm install cypress@15.10.0
npm test
npm install cypress@15
npm test
npm install cypress@16
npm test

Confirm that each test is successful.


Note

Low Risk
Documentation and example-test gating only; no changes to the GitHub Action runtime behavior.

Overview
Prepares the repo for a Cypress 16 upgrade by keeping the legacy examples/env workflow and tests while avoiding failures where Cypress.env() is deprecated (15.10+) or removed (16+).

examples/env e2e specs now use semver to run the existing Cypress.env() assertions only on Cypress <15.10.0; on newer versions they register a no-op skip test instead. semver is added as a devDependency in that example package.

Docs and CI comments are updated to state that Cypress.env() is legacy, point readers to example-expose.yml for non-sensitive config on 15.10+, and clarify in README that the action env input is for older Cypress and for secrets on 15.10+, with expose for public values.

Reviewed by Cursor Bugbot for commit 3962636. Bugbot is set up for automated code reviews on this repo. Configure here.

@cypress-app-bot

Copy link
Copy Markdown
Collaborator

@MikeMcC399 MikeMcC399 added type: enhancement New feature or request tests labels Sep 5, 2026
@MikeMcC399 MikeMcC399 self-assigned this Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants