-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Speed up CI #1076
Speed up CI #1076
Conversation
Hopefully it's become more reliable since a73374d.
We're not building so the version isn't necessary.
I definitely wouldn't cache I am not sure about |
The speedup is drastic enough on Appveyor that it's probably worth it there. I'd avoid it on Travis though. |
before_install: | ||
- 'npm install -g npm@latest' | ||
- 'node -e "process.exit(Number(process.version.match(/^v(\d+)/)[1])>=6?0:1)" || npm install -g npm@latest' |
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.
Can simplify this:
Number(process.version.match(/^v(\d+)/)[1])
into:
Number(process.version.slice(1)[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.
That'll break in 2018 when Node.js v10 ships. I'd rather just do it properly.
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.
Good catch.
npm still verifies all declared dependencies are present though. We could end up deleting a dependency that we still use, yes, but we have a similar problem with deduped dependencies. Perhaps we could run |
The latest XO prevents this through the |
That should help. Worth pruning then? Are you OK with caching in Travis given #1080? |
4bc021e
to
476c653
Compare
I'm still sceptical to caching the |
Ensure top-level dependencies are indeed no longer available when removed from the package.json.
Soon npm@latest will be npm@4. Let's stick to v3 for now.
Now pinning npm version, is that OK?
Inspired by https://twitter.com/kentcdodds/status/786282951210262528 I looked into caching npm and
node_modules
, which led to some more improvements:node_modules
in both Travis and AppveyorOn Travis the first, non-cached run took 5m59s. The second run took 4m15s. I think it saves on nyc instrumentation too since that's cached in
node_modules
. On Appveyor the time went from 13m3s to 9m30s (note that Appveyor doesn't run builds in parallel for us).