From f14ab269220f77df74406374c78a1dee9bba3a2a Mon Sep 17 00:00:00 2001 From: Michael Solati Date: Sun, 7 Jun 2020 19:09:10 -0700 Subject: [PATCH] build: use `npm-cache` --- .github/workflows/deploy.yml | 14 ++++++++++++++ .github/workflows/lint-and-test.yml | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3b9cbba..a375668 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,6 +25,13 @@ jobs: echo "_auth=$NPM_TOKEN" >> /home/runner/work/_temp/.npmrc echo "email=$NPM_EMAIL" >> /home/runner/work/_temp/.npmrc echo "always-auth=true" >> /home/runner/work/_temp/.npmrc + - name: NPM Cache + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - name: Install run: npm i - name: Build @@ -41,6 +48,13 @@ jobs: uses: actions/setup-node@v1 with: node-version: 12.x + - name: NPM Cache + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - name: Install run: npm i - name: Install Firebase Tools diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml index 39238e6..8ac04f7 100644 --- a/.github/workflows/lint-and-test.yml +++ b/.github/workflows/lint-and-test.yml @@ -13,6 +13,13 @@ jobs: uses: actions/setup-node@v1 with: node-version: 12.x + - name: NPM Cache + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - name: Install run: npm i - name: Lint