Skip to content

Commit

Permalink
Reworked CI workflow to optimize setup
Browse files Browse the repository at this point in the history
refs TryGhost/Toolbox#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
  • Loading branch information
daniellockyer committed Jul 4, 2023
1 parent 7f9f467 commit adfe15c
Show file tree
Hide file tree
Showing 7 changed files with 814 additions and 627 deletions.
18 changes: 18 additions & 0 deletions .github/actions/restore-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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.')
53 changes: 0 additions & 53 deletions .github/workflows/admin-x-settings-tests.yml

This file was deleted.

Loading

0 comments on commit adfe15c

Please sign in to comment.