Skip to content
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

Add npm ci check #118

Merged
merged 4 commits into from
Apr 21, 2018
Merged

Add npm ci check #118

merged 4 commits into from
Apr 21, 2018

Conversation

ajlai
Copy link
Contributor

@ajlai ajlai commented Apr 18, 2018

npm 5.8.0 has a new command npm-ci which functions like npm install but also checks that the package-lock.json is up to date with the package.json file.

This PR changes the travis config to use npm ci.

#126

@ajlai
Copy link
Contributor Author

ajlai commented Apr 18, 2018

For an example of how a travis failure looks when package-lock.json hasn't been updated, see https://travis-ci.org/ajlai/clasp/jobs/367926019

@coveralls
Copy link

coveralls commented Apr 18, 2018

Pull Request Test Coverage Report for Build 85

  • 0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 10.56%

Totals Coverage Status
Change from base Build 83: 0.0%
Covered Lines: 93
Relevant Lines: 658

💛 - Coveralls

@grant
Copy link
Contributor

grant commented Apr 18, 2018

I appreciate the PR, but I don't think this PR speeds up the build.
https://travis-ci.org/google/clasp/builds/367971284

I'd remove osx / linux if the goal is to speed up Travis.

@ajlai
Copy link
Contributor Author

ajlai commented Apr 18, 2018

My original goal wasn't to speed up the build (although that would have been nice). It's just to make sure package-lock.json gets updated and checked in when the package.json does.

@grant
Copy link
Contributor

grant commented Apr 18, 2018

  • Can you create an issue before creating a PR? The PR description is unclear what this is trying to solve.
  • Can you add a better comment as to why we use ci?
    • "keep the npm cache around to speed up installs"
      • Seems like this PR is trying to speed up the install. ci seems to do something different (more stable install)
      • Change this comment to something more descriptive.
    • You can also link this in a comment: https://docs.npmjs.com/cli/ci

LGTM after those changes.

Copy link
Contributor

@grant grant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good.

@grant grant merged commit 1a413d7 into google:master Apr 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants