Skip to content

Commit

Permalink
ci(workflow): add 'npm' cache for actions/setup-node in .github/workf…
Browse files Browse the repository at this point in the history
  • Loading branch information
oscard0m authored Oct 13, 2021
1 parent 02ebd32 commit 2723f00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/generate-theme-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: "12.x"
cache: npm

- name: npm install, generate readme
run: |
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,10 @@ jobs:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: "12.x"

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key:
${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-cache-
cache: npm

- name: Install & Test
run: |
Expand Down

0 comments on commit 2723f00

Please sign in to comment.