From 25762419077b2936a1a286b5d53cb6851acf2d7e Mon Sep 17 00:00:00 2001 From: Konstantin Vyatkin Date: Thu, 7 Nov 2019 21:39:26 -0400 Subject: [PATCH] add node modules caching --- .github/workflows/browsers.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/browsers.yml b/.github/workflows/browsers.yml index 6ec0c87..d4a728d 100644 --- a/.github/workflows/browsers.yml +++ b/.github/workflows/browsers.yml @@ -44,6 +44,17 @@ jobs: - uses: actions/setup-node@v1 with: node-version: '12.x' + + - name: Cache node modules + uses: actions/cache@v1 + with: + path: node_modules + key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-build-${{ env.cache-name }}- + ${{ runner.OS }}-build- + ${{ runner.OS }}- + - run: | npm ci npm run build @@ -96,9 +107,15 @@ jobs: - uses: actions/checkout@v1 with: fetch-depth: 1 - - uses: actions/setup-node@v1 + - name: Cache node modules + uses: actions/cache@v1 with: - node-version: '12.x' + path: node_modules + key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-build-${{ env.cache-name }}- + ${{ runner.OS }}-build- + ${{ runner.OS }}- - run: | npm ci npm run build