cypress-io / circleci-orb

Install, cache and run Cypress.io tests on CircleCI with minimal configuration.

Home Page:https://circleci.com/orbs/registry/orb/cypress-io/cypress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

✨ Allow `record` to be set via an env variable

a-tokyo opened this issue · comments

Right now to record cypress tests in the dashboard we have to hardcode record: true in the circleCI config file. This prevents developers from conditionally recording the tests, ie: if a developer only wants to record tests on a certain branch.

Example use case:
We'd like to only record production tests, not feature branches.

Proposed solution:

  • Setting the env variable CI_CYPRESS_RECORD to true automatically sets the record parameter to true.
  • We can also pass --record $CI_CYPRESS_RECORD to the cypress main command

More than happy to work on this (:

Any news on this? 🚀

commented

hey @a-tokyo thanks for creating this issue. Sorry it took so long for us to take a look at this. We are currently reviewing the entire orb with the intentions on releasing a v3 orb.

@jordanpowell88 That's great news! Thanks for the awesome work

This is now possible with 3.0.0 of the cypress-orb. You can pass any flags you want to our cypress-command just as you would in a terminal.

      - cypress/run:
          cypress-command: 'npx cypress run --parallel --record $CI_CYPRESS_RECORD'