From e4b0db9b12c13c861b554be91ad5bcf74f54191a Mon Sep 17 00:00:00 2001 From: Joseph Yi Date: Sat, 2 Oct 2021 23:28:50 -0700 Subject: [PATCH] Use setup-node action's caching (#1476) * Use setup-node action's caching * additional cleanup of caching boilerplate Co-authored-by: Joseph Yi --- .github/workflows/ci.yml | 42 +++------------------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44776cdc2..621ba467f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,19 +32,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node_version }} - - - 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 }}- + cache: 'yarn' - name: Debug run: yarn versions @@ -70,19 +58,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: 14 - - - 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 }}- + cache: 'yarn' - name: Debug run: yarn versions @@ -108,19 +84,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: 14 - - - 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 }}- + cache: 'yarn' - name: Debug run: yarn versions