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

chore: enable cache for npm on GitHub Actions #629

Merged
merged 3 commits into from Aug 10, 2021

Conversation

sosukesuzuki
Copy link
Member

ref: https://github.com/actions/setup-node#caching-packages-dependencies

Now we can enable cache for npm dependencies with actions/setup-node@v2

@sosukesuzuki sosukesuzuki requested a review from a team as a code owner August 2, 2021 05:36
@sosukesuzuki sosukesuzuki requested review from pirosikick and sakit0 and removed request for a team August 2, 2021 05:36
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Copy link
Member Author

Choose a reason for hiding this comment

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

The only real change is in this line. Other lines were changed by Prettier via my text editor formatter.

@codecov-commenter
Copy link

codecov-commenter commented Aug 2, 2021

Codecov Report

Merging #629 (8713f46) into master (bbe9c58) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #629   +/-   ##
=======================================
  Coverage   51.39%   51.39%           
=======================================
  Files          24       24           
  Lines        1043     1043           
  Branches      198      198           
=======================================
  Hits          536      536           
  Misses        459      459           
  Partials       48       48           

@sosukesuzuki sosukesuzuki changed the title Enable cache for npm on GitHub Actions chore: enable cache for npm on GitHub Actions Aug 2, 2021
Copy link
Contributor

@koba04 koba04 left a comment

Choose a reason for hiding this comment

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

👍 Great 👏

@koba04
Copy link
Contributor

koba04 commented Aug 6, 2021

@sosukesuzuki Should we use npm install instead of npm ci to re-use the cache?

@sosukesuzuki
Copy link
Member Author

@koba04 No, maybe we can use npm ci. Why npm install is used in README of actions/setup-node is to consider users they have no lock-file ( actions/setup-node#103 ).

@koba04
Copy link
Contributor

koba04 commented Aug 10, 2021

@sosukesuzuki Thanks! That makes sense.

@koba04 koba04 merged commit 0308dc2 into cybozu:master Aug 10, 2021
@sosukesuzuki sosukesuzuki deleted the enable-cache-for-deps-on-ci branch August 10, 2021 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants