88954f7318
refs https://github.com/TryGhost/Toolbox/issues/609 - this rewrites the CI workflow to include a pre-test step which will download and cache dependencies, and will only run tests when the associated code changes - this provides a huge improvement over the existing setup, and will save us a lot of time in CI
18 lines
556 B
YAML
18 lines
556 B
YAML
name: "Restore dependency cache"
|
|
description: "Restore the dependency cache."
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Check dependency cache
|
|
id: dep-cache
|
|
uses: actions/cache/restore@v3
|
|
with:
|
|
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
|
|
key: ${{ env.DEPENDENCY_CACHE_KEY }}
|
|
|
|
- name: Check if caches are restored
|
|
uses: actions/github-script@v6
|
|
if: steps.dep-cache.outputs.cache-hit != 'true'
|
|
with:
|
|
script: core.setFailed('Dependency cache could not be restored - please re-run ALL jobs.') |