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).
This commit is contained in:
Pierre de La Morinerie 2021-10-26 11:07:42 +00:00
parent d83c036ef1
commit 21efece09e

View file

@ -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: