From f8877800e5dee4e2891fc220730cd2e1a8c57ec9 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 16 Mar 2021 19:57:00 +0100 Subject: [PATCH] chore: update github action --- .github/workflows/ci.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0cae6740..773c76271 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node: [12] + node: [14] steps: - uses: actions/setup-node@v2 @@ -25,15 +25,27 @@ jobs: - name: checkout uses: actions/checkout@master - - name: cache node_modules - uses: actions/cache@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 with: - path: node_modules - key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - name: Install dependencies if: steps.cache.outputs.cache-hit != 'true' - run: yarn + run: yarn --frozen-lockfile --non-interactive + + - name: Lint + run: yarn lint + + - name: Sync + run: yarn sync - name: Build run: yarn build