From 1601d2e4f90de971fb03b2134f9c8d337f7ee195 Mon Sep 17 00:00:00 2001 From: Braden Napier Date: Fri, 10 Jul 2020 18:29:30 -0400 Subject: [PATCH] cache dependencies --- .github/workflows/test.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 848d1b0..acde49d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,6 +16,22 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - 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: Install dependencies + run: yarn + env: + NODE_ENV: development - uses: ./ with: reportIgnoredFiles: true