Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

cache Babashka, also guard cache generation (#79841)

Chris Vandoodewaard19899d290d88
diff --git a/.github/actions/prepare-backend/action.yml b/.github/actions/prepare-backend/action.yml
index ed0227ca816..e83704741bc 100644
--- a/.github/actions/prepare-backend/action.yml
+++ b/.github/actions/prepare-backend/action.yml
@@ -49,6 +49,8 @@ runs:
path: |
~/.m2
~/.gitlibs
+ ~/.deps.clj
+ bin/bb
key: ${{ steps.get-cache-keys.outputs.m2-cache-key }}
restore-keys: |
${{ steps.get-cache-keys.outputs.m2-restore-key }}
diff --git a/.github/workflows/cache-generator.yml b/.github/workflows/cache-generator.yml
index f0938827528..bce418381a9 100644
--- a/.github/workflows/cache-generator.yml
+++ b/.github/workflows/cache-generator.yml
@@ -53,6 +53,10 @@ jobs:
cypress-cache-key: ${{ steps.get-cache-keys.outputs.cypress-cache-key }}
generate-caches:
+ # Prevent a workflow_dispatch triggered from any branch besides master. This would overwrite the default
+ # cache keys but the cache would be innacessible to other branches since Github prevents cross-branch
+ # cache hits (except for the default branch), breaking the cache entirely.
+ if: ${{ github.ref_name == 'master' }}
runs-on: ${{ vars.DEFAULT_RUNNER_KEY }}
timeout-minutes: 30
needs: get-cache-keys
@@ -103,6 +107,7 @@ jobs:
":kondo" # resolve-backport-conflicts.yml (replace-deps)
":run:ee" # cross-branch-migration-test
":dev:ee:migrate" # cross-branch-migration-test
+ ":whitespace-linter" # whitespace linter
)
for combo in "${combos[@]}"; do
echo "::group::clojure -P -A${combo}"
@@ -120,6 +125,8 @@ jobs:
path: |
~/.m2
~/.gitlibs
+ ~/.deps.clj
+ bin/bb
key: ${{ env.M2_CACHE_KEY }}
# Frontend preparation and caches