actions: Restore dependencies, skip (re)installing them if restore succeeds

Restore these dependencies from the "build editor" job cache,
and skip (re)installing the dependencies
if restoring from cache succeeds.

Saves a huge amount of run-time, compared to having to (re)install
all the editor's dependencies over again fresh
in each individual package's respective test job.

Estimated savings of ~1 hour 10 minutes (?) total run time.
This commit is contained in:
DeeDeeG 2023-04-16 16:39:38 -05:00
parent 287aea1ab3
commit e5a7543994

View File

@ -157,10 +157,22 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16
- name: Restore dependencies from Cache
id: restore-dependencies
uses: actions/cache@v3
with:
path: |
node_modules
packages
key: dependencies-${{ github.sha }}
- name: Install Dependencies
if: steps.restore-dependencies.outputs.cache-hit != 'true'
run: yarn install || yarn install
- name: Build Dependencies
if: steps.restore-dependencies.outputs.cache-hit != 'true'
run: yarn build || yarn build
- name: Restore pulsar from Cache