-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Proposal: download Cypress to the common cached folder #1300
Comments
Either this is a duplicate of #1233 or vice-versa, not overly concerned which issue is closed but they are for the most part duplicates |
psst: If you use |
The Cypress.io download always doubles the time my |
Can you cache node_modules ?
…Sent from my iPhone
On Mar 20, 2018, at 11:22, Eirik Birkeland ***@***.***> wrote:
The Cypress.io download always doubles the time my yarn install takes, on a 25 mbit connection. There are ways to get around, but would greatly appreciate caching.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
To work around this issue we build a docker image with our test suite's dependencies pre-installed. |
Would love to see this put into a global location. My team is really excited about Cypress, but we've got to optimize the build time. I tried out npm ci and that actually shaved 2 minutes off the install process. Preventing this download from needing to occur repeatedly would shave about another 40-45 seconds off. |
@bahmutov I can cache node_modules on CI server, but for local builds we often change our dependencies because we are jumping between branches. |
Also having this problem with slow install times for local development using Yarn. |
currently in progress in PR #1582 |
This also enables us to ship our docker images with Cypress pre-cached, which will help simplify CI setup! |
Yeah it's true but we'll need to update our build process to include it - but we should it's a good idea. Open a separate issue for that and we can work on that while you finish this PR. |
we need to think about caching Cypress in the docker container - because it takes up a lot of space. If we do second split (Electron vs our code), then YES, @bkucera that would be super good idea to include multiple versions pre-cached because they would not add much weight |
@bahmutov good point... that's another "+" in the corner of splitting out those two things vs caching the entire app bundle. |
Released in |
According to Gleb's comment, this issue should include:
I just tried to:
Cypress has been downloaded again instead of using the local version, available in cypress global cache folder. Am I missing something? Is that not the expected behaviour and maybe I should open a new issue? That's a great feature, looking forward to it, congrats :) |
@maxime1992 yep, that was a bug, fixed in |
If one installs it globally on machine and versions match (with project), then installing with npm shouldn't pull it again and install on project level, correct? |
@jeserkin correct |
@bkucera Is it possible, that installing dependencies with
|
Feature
Instead of downloading and unzipping Cypress into
./node_modules/cypress/dist/
download it into a global folder for better caching. This will allowTo determine output location use https://github.com/LinusU/node-cachedir
cypress run, open, verify
take arg--binary-folder
(looks like:/foo/bar/Cypress.app
(macOS) or/foo/bar/Cypress
(linux, win), to override default path to cypress binary folder (default is(cypressCache)/<cli version>/Cypress.app
)CYPRESS_BINARY_FOLDER=/path/to/Cypress.app
cypress install
(cypressCache)/<cli version>
for already installed binary folder (Cypress.app
on macOS,Cypress
on linux/win), and if binary version matches(installVersion)
, do nothing.(installVersion)
defaults to cli version, is overridden by env varCYPRESS_BINARY_VERSION
during installsemvar: 1.2.3
,url: www.cypress.io/download/1.2.3
, orzip: /path/to/cypress.zip
cypress install --force
, force reinstall to(cypressCache)/<cli version>
(cypressCache)
defaults to:~/Library/Caches/Cypress
(macOS)~/.cache/Cypress
(linux)/AppData/Local/Cypress/Cache
(win)(cypressCache)
can be overridden with env varCYPRESS_CACHE_DIRECTORY
(cypressCache)
custom error message for failed access to
(cypressCache)
docs
command line usagemanual testing all use cases
--binary-foldercypress runcypress opencypress verifyinvalidadd local code coverage with
nyc
send tocoveralls
in CIStretch goal
ffmpeg
separately to avoid bundling the same version over and over?The text was updated successfully, but these errors were encountered: