-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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 caching #1699
CLI caching #1699
Conversation
Code coverage with |
cli/__snapshots__/install_spec.js
Outdated
exports['version already installed 1'] = ` | ||
Cypress 1.2.3 is already installed. Skipping installation. | ||
exports['continues installing on failure 1'] = ` | ||
Installed version ([object Object]) does not match needed version (1.2.3). |
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.
JavaScript classic [object Object]
cli/lib/cli.js
Outdated
@@ -114,6 +116,7 @@ module.exports = { | |||
.option('--group', text('group'), coerceFalse) | |||
.option('--group-id <group-id>', text('groupId')) | |||
.option('--dev', text('dev'), coerceFalse) | |||
.option('--cypress-path <cypress path>', text('cypressPath')) |
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.
probably want to say this is cypress folder
otherwise it might seem like Cypress app filepath
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.
should we do --cypress-dir
or --cypress-folder
? or something longer like --path-to-binary
cli/lib/cli.js
Outdated
require('./tasks/verify') | ||
.start({ force: true, welcomeMessage: false }) | ||
.start(_.extend(parseOpts(opts), { force: true, welcomeMessage: false })) |
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.
could be better split into options + start
const defaultOption = { force: true, welcomeMessage: false }
const parsed = parseOpts(opts)
const options = _.extend(parsed, defaultOptions)
require('./tasks/verify')
.start(options)
@@ -12,17 +12,24 @@ | |||
"scripts": { | |||
"test": "npm run test-unit", | |||
"test-unit": "npm run dtslint && npm run unit", | |||
"test-watch": "bin-up mocha --watch", | |||
"test-watch": "npm run unit -- --watch", |
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 get what you are doing - reusing npm run unit
command, good
nice, nice, what are we doing to store also, can we think how we are going to test it - maybe on Circle after building binary... It can be done in a separate commits later after this lands. |
cli/test/.eslintrc
Outdated
@@ -1,6 +1,7 @@ | |||
{ | |||
"globals": { | |||
"lib": true | |||
"lib": true, | |||
"mocha": true |
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.
Maybe remove this
cli/test/lib/tasks/info_spec.js
Outdated
@@ -2,127 +2,128 @@ require('../../spec_helper') | |||
|
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.
Rename to state_spec.js
@@ -32,13 +39,15 @@ | |||
"@types/bluebird": "3.5.18", | |||
"@types/chai": "4.0.8", | |||
"@types/chai-jquery": "1.1.35", | |||
"@types/chalk": "2.2.0", |
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.
why are @types
in dependencies over devDependencies?
|
changing binary directory to be
|
@bkucera can you sign the CLA? Thanks |
@brian-mann I'm not sure what's happened with the cla-assistant on this PR, but it appears to be bugging. I manually checked and verified that @bkucera signed the CLA for |
I told the CLA assistant to recheck PR's and it's ready to be merged now. @bkucera did you have anything else to add to this PR or is it ready to go? Did you manually test everything, setting env vars, changing cache location, installing current version of Cypress, etc? Did you try manually testing it from another project after Cypress has been installed from a different project? |
@brian-mann trying to keep #1300 current with progress, but I need to finish |
@brian-mann one feature left, need to always use cache when CYPRESS_BINARY_VERSION is url, and tell user that, so if cypress is already cached on that version and env var is set to URL, tell user to use --force to force install from URL |
closes #1300 #1254 #890