From 06b433bb092c50313f8a8fbae3d085c9623513c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Wed, 1 Jul 2020 23:35:20 -0400 Subject: [PATCH] chore: add cache actions --- .github/workflows/coverage.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f50b56856cea..eb5b4eb88246 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -12,6 +12,16 @@ jobs: uses: actions/setup-node@v2-beta with: node-version: "*" + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - name: Generate coverage report run: | make -j test-ci-coverage