From a58a3922cd297164c9504667fe5854a8785294b2 Mon Sep 17 00:00:00 2001 From: jamaljsr <1356600+jamaljsr@users.noreply.github.com> Date: Wed, 29 Jul 2020 08:43:07 -0400 Subject: [PATCH] ci: add yarn cache to backend CI build --- .github/workflows/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c68660c4b..7872d8769 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,6 +48,7 @@ jobs: path: ${{ steps.yarn-cache-dir.outputs.dir }} key: ${{ runner.os }}-yarn-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | + ${{ runner.os }}-yarn-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }} ${{ runner.os }}-yarn-${{ matrix.node_version }}- ${{ runner.os }}-yarn- @@ -90,6 +91,21 @@ jobs: ${{ runner.os }}-go-${{ matrix.go_version }}- ${{ runner.os }}-go- + - name: get yarn cache dir + id: yarn-cache-dir + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: yarn cache + uses: actions/cache@v2 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir.outputs.dir }} + key: ${{ runner.os }}-yarn-12.x-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn-12.x-${{ hashFiles('**/yarn.lock') }} + ${{ runner.os }}-yarn-12.x- + ${{ runner.os }}-yarn- + - name: setup go v${{ matrix.go_version }} uses: actions/setup-go@v2 with: