Skip to content

Commit 54cfe7d

Browse files
XhmikosRJustinBeckwith
andauthoredJan 24, 2021
build: CI: add caching for Windows too (#253)
Co-authored-by: Justin Beckwith <beckwith@google.com>
1 parent 43cb074 commit 54cfe7d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎.github/workflows/ci.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ jobs:
3737
- uses: actions/setup-node@v2
3838
with:
3939
node-version: ${{ env.NODE }}
40+
- name: Get npm cache directory
41+
id: npm-cache
42+
run: |
43+
echo "::set-output name=dir::$(npm config get cache)"
44+
- name: Set up npm cache
45+
uses: actions/cache@v2
46+
with:
47+
path: ${{ steps.npm-cache.outputs.dir }}
48+
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
49+
restore-keys: |
50+
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
51+
${{ runner.os }}-node-v${{ env.NODE }}-
4052
- run: npm ci
4153
- run: npm test
4254
lint:

0 commit comments

Comments
 (0)
Please sign in to comment.