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

feat: add CYPRESS_SKIP_VERIFY option to suppress verification #29836

Merged
merged 15 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
## 13.13.4
## 13.14.0

_Released 8/27/2024 (PENDING)_

**Performance:**

- Fixed a potential memory leak in the Cypress server when re-connecting to an unintentionally disconnected CDP connection. Fixes [#29744](https://github.com/cypress-io/cypress/issues/29744). Addressed in [#29988](https://github.com/cypress-io/cypress/pull/29988)

**Features:**

- Added a `CYPRESS_SKIP_VERIFY` flag to enable suppressing Cypress verification checks. Addresses [#22243](https://github.com/cypress-io/cypress/issues/22243).

**Dependency Updates:**

- Updated `detect-port` from `1.3.0` to `1.6.1`. Addressed in [#30038](https://github.com/cypress-io/cypress/pull/30038).
Expand Down
7 changes: 7 additions & 0 deletions cli/lib/tasks/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,15 @@ const start = (options = {}) => {
force: false,
welcomeMessage: true,
smokeTestTimeout: VERIFY_TEST_RUNNER_TIMEOUT_MS,
skipVerify: util.getEnv('CYPRESS_SKIP_VERIFY') === 'true',
})

if (options.skipVerify) {
debug('skipping verification of the Cypress app')

return Promise.resolve()
joshuajtward marked this conversation as resolved.
Show resolved Hide resolved
}

if (options.dev) {
return runSmokeTest('', options)
}
Expand Down
10 changes: 10 additions & 0 deletions cli/test/lib/tasks/verify_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ context('lib/tasks/verify', () => {
expect(newVerifyInstance.VERIFY_TEST_RUNNER_TIMEOUT_MS).to.eql(DEFAULT_VERIFY_TIMEOUT)
})

it('returns early when `CYPRESS_SKIP_VERIFY` is set to true', () => {
process.env.CYPRESS_SKIP_VERIFY = 'true'
delete require.cache[require.resolve(`${lib}/tasks/verify`)]
const newVerifyInstance = require(`${lib}/tasks/verify`)

return newVerifyInstance.start().then((result) => {
expect(result).to.eq(undefined)
})
})

it('logs error and exits when no version of Cypress is installed', () => {
return verify
.start()
Expand Down