cypress-io / circleci-orb

Install, cache and run Cypress.io tests on CircleCI with minimal configuration.
https://circleci.com/orbs/registry/orb/cypress-io/cypress
MIT License
161 stars 101 forks source link

Feature request: Add no-workspace parameter to cypress/install job #348

Closed stromsvag closed 1 year ago

stromsvag commented 3 years ago

When using cypress-io/cypress@1.28.0, the cypress/install job will always persist ~/.cache/Cypress and ~/project. In our case the ~/project folder is very large and most of its content is unnecessary for the cypress/run job that follows.

It would be great if we were able to customize what to persist to workspace after running cypress/install so that we could optimize our CI pipeline. The cypress/run job has the parameter no-workspace. It would be great if the cypress/install job had the same parameter. That way we could add our own persist_to_workspace step via the post-install parameter.

FINDarkside commented 3 years ago

Also for some reason cypress/run wants to run npm ci again even though node_modules is saved to workspace. I think there's a lot of room for optimization here. I already removed the installation phase from cypress/run by giving it empty install script, but I could also save ~12s if there was a way to disable "restore cache" (at least node_modules part of it) step from it as well.

clintspeed commented 2 years ago

I have a similar issue where our tests are contained in a larger monorepo. The entire project directory is being added to the workspace where it would be more efficient to only add project/test to the workspace as this is where the cypress tests are located.

jennifer-shehane commented 1 year ago

Hey everyone, we've revamped the CircleCI orb in v3.0.0 to handle things more intelligently. By default you shouldn't need an install job at all (but its still available if you need customization). We also changed completely how workspaces were used. Please try 3.0.0 of the orb and open a new issue if this is still a problem.