From 21efece09e1cf985fe15296da8cca2a6ed866912 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Tue, 26 Oct 2021 11:07:42 +0000 Subject: [PATCH] ci: use builtin cache for node modules This is around 20s faster (10s when retrieved the cache and installing node modules, and 10s when saving the cache). --- .github/workflows/ci.yml | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47554ed09..eac5a92b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,19 +22,10 @@ jobs: uses: actions/setup-node@v2 with: node-version: '14' - - name: Find yarn cache location - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: JS package cache - uses: actions/cache@v2 - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Install packages - run: | - yarn install --frozen-lockfile + cache: yarn + + - name: Install node modules + run: yarn install --frozen-lockfile - name: Run linters run: | @@ -79,19 +70,10 @@ jobs: uses: actions/setup-node@v2 with: node-version: '14' - - name: Find yarn cache location - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: JS package cache - uses: actions/cache@v2 - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Install packages - run: | - yarn install --frozen-lockfile + cache: 'yarn' + + - name: Install Node modules + run: yarn install --frozen-lockfile - name: Setup test database env: