Use setup-node action's caching (#1476)

* Use setup-node action's caching

* additional cleanup of caching boilerplate

Co-authored-by: Joseph Yi <joseph.yi@shift.com>
This commit is contained in:
Joseph Yi 2021-10-02 23:28:50 -07:00 committed by GitHub
parent 5d3e3ae542
commit e4b0db9b12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,19 +32,7 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: ${{ matrix.node_version }} node-version: ${{ matrix.node_version }}
cache: 'yarn'
- name: Get yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Set dependencies cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-${{ matrix.node_version }}-
- name: Debug - name: Debug
run: yarn versions run: yarn versions
@ -70,19 +58,7 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: 14 node-version: 14
cache: 'yarn'
- name: Get yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Set dependencies cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-${{ matrix.node_version }}-
- name: Debug - name: Debug
run: yarn versions run: yarn versions
@ -108,19 +84,7 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: 14 node-version: 14
cache: 'yarn'
- name: Get yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Set dependencies cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-${{ matrix.node_version }}-
- name: Debug - name: Debug
run: yarn versions run: yarn versions