-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
cli: unnzip Cypress using unzip
utility on Linux
#5851
Conversation
Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.
PR Review ChecklistIf any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'. User Experience
Functionality
Maintainability
Quality
Internal
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
@@ -113,13 +157,20 @@ const unzip = ({ zipFilePath, installDir, progress }) => { | |||
case 'darwin': | |||
return unzipWithOsx() | |||
case 'linux': | |||
return unzipWithUnzipTool() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but will every Linux system include unzip
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, but it silently falls back to node.js unzip if it fails
|
||
const sp = cp.spawn('unzip', ['-o', zipFilePath, '-d', installDir]) | ||
|
||
sp.on('error', unzipWithNode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I see you fall to Node in that case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ha // f-it just unzip with node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe that is your comment 😆
shell we start adding |
|
I added a sample test, but what really bothers me is that it works by itself, yet when all the tests run together - there are 4 tests in |
This is pretty sweet - this PR unzips on Circle in 21 seconds, while develop branch runs same job in 38 seconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this PR and thinks it achieves its purpose. I wish we did another pass at refactoring and moved each "unzip" function into own functions we can spy on / stub from tests. Right now they all live in shared single large function, but that's ok for now, keeps change to a minimum
unzip
utility on Linuxunzip
utility on Linux
* unzip using 'unzip' utility on linux * add example unzip test
* unzip using 'unzip' utility on linux * add example unzip test
User facing changelog
unzip
binary duringcypress install
before trying the slower, Node.js-based unzipping method.Additional details
unzip
: 5320msunzip
could work on macOS or windows, but it's probably not going to exist on either so I'm not sure we should even attempt itHow has the user experience changed?
cypress install
is much fasterPR Tasks
ditto
stuff doesn't have a testunzip
is unavailable, but had to skip it - it was causing weirdverify_spec
failures