The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Consolidate caches (#66036)
Nemanja Glumac135abb44a55d
diff --git a/.github/actions/get-cache-keys/action.yml b/.github/actions/get-cache-keys/action.ymlindex 91975a1bce5..148468fea0d 100644--- a/.github/actions/get-cache-keys/action.yml+++ b/.github/actions/get-cache-keys/action.yml@@ -13,6 +13,9 @@ outputs:eslint-cache-key:description: "The cache key for Eslint cache"value: ${{ steps.keys-factory.outputs.eslint-cache-key }}+ cypress-cache-key:+ description: "The cache key for Cypress cache"+ value: ${{ steps.keys-factory.outputs.cypress-cache-key }}runs:using: "composite"@@ -23,10 +26,12 @@ runs:M2_CACHE_PREFIX='M2'NODE_CACHE_PREFIX='node-modules'ESLINT_CACHE_PREFIX='eslint'+ CYPRESS_CACHE_PREFIX='cypress'WEEK_OF_YEAR=$(/bin/date "+%G-%V")CACHE_SUFFIX="${{ runner.os }}-$WEEK_OF_YEAR"echo "m2-cache-key=$M2_CACHE_PREFIX-$CACHE_SUFFIX" >> $GITHUB_OUTPUTecho "node-cache-key=$NODE_CACHE_PREFIX-$CACHE_SUFFIX" >> $GITHUB_OUTPUTecho "eslint-cache-key=$ESLINT_CACHE_PREFIX-$CACHE_SUFFIX" >> $GITHUB_OUTPUT+ echo "cypress-cache-key=$CYPRESS_CACHE_PREFIX-$CACHE_SUFFIX" >> $GITHUB_OUTPUTshell: bashdiff --git a/.github/actions/prepare-cypress/action.yml b/.github/actions/prepare-cypress/action.ymlindex a35a679304f..0ce24af4752 100644--- a/.github/actions/prepare-cypress/action.yml+++ b/.github/actions/prepare-cypress/action.yml@@ -22,16 +22,16 @@ runs:chrome-version: 1097615id: setup-chrome- - name: Get current week of year- id: get-date- run: |- echo "week-of-year=$(/bin/date "+%G-%V")" >> $GITHUB_OUTPUT- shell: bash+ - name: Get cache keys+ uses: ./.github/actions/get-cache-keys+ id: get-cache-keys+- name: Get Cypress cache- uses: actions/cache@v4+ uses: actions/cache/restore@v4with:path: ~/.cache/Cypress- key: ${{ runner.os }}-Cypress-${{ steps.get-date.outputs.week-of-year }}+ key: ${{ steps.get-cache-keys.outputs.cypress-cache-key }}+- name: Ensure that Cypress executable is readyrun: |yarn cypress installdiff --git a/.github/workflows/cache-generator.yml b/.github/workflows/cache-generator.ymlindex d9f5f30ed84..0aad99233c8 100644--- a/.github/workflows/cache-generator.yml+++ b/.github/workflows/cache-generator.yml@@ -30,8 +30,8 @@ name: Cache Generatoron:schedule:- - cron: '0 3 * * 1' # Mondays at 03:00 UTC- workflow_dispatch: # manually update the cache+ - cron: "0 3 * * 1" # Mondays at 03:00 UTC+ workflow_dispatch: # manually update the cacheconcurrency:group: cache-generator@@ -49,6 +49,7 @@ jobs:m2-cache-key: ${{ steps.get-cache-keys.outputs.m2-cache-key }}node-cache-key: ${{ steps.get-cache-keys.outputs.node-cache-key }}eslint-cache-key: ${{ steps.get-cache-keys.outputs.eslint-cache-key }}+ cypress-cache-key: ${{ steps.get-cache-keys.outputs.cypress-cache-key }}generate-m2-cache:runs-on: ubuntu-22.04@@ -63,15 +64,20 @@ jobs:# Add or remove aliases to affect the cache size and its contents.# Adjust to taste, then redeploy this workflow.- - name: Pre-resolve dependencies+ - name: Pre-resolve Clojure dependenciesrun: clojure -A:build:dev:ee:ee-dev:drivers:drivers-dev:cljs -P+ - name: Let Mage install babashka and clojure-tools+ run: ./bin/mage+- name: Update M2 cacheuses: ./.github/actions/update-cachewith:path: |~/.m2~/.gitlibs+ ~/.deps.clj+ ${{ github.workspace}}/bin/bbkey: ${{ env.M2_CACHE_KEY }}generate-frontend-caches:@@ -81,6 +87,7 @@ jobs:env:NODE_CACHE_KEY: ${{ needs.get-cache-keys.outputs.node-cache-key }}ESLINT_CACHE_KEY: ${{ needs.get-cache-keys.outputs.eslint-cache-key }}+ CYPRESS_CACHE_KEY: ${{ needs.get-cache-keys.outputs.cypress-cache-key }}steps:- uses: actions/checkout@v4# `prepare-frontend` action (1) prepares Node.js and (2) fetches the node_modules cache if it exists.@@ -92,7 +99,7 @@ jobs:- name: Install front-end dependenciesuses: ./.github/actions/prepare-frontendwith:- apply-patches: 'false'+ apply-patches: "false"- name: Get yarn cache directoryid: yarn-cache-dir@@ -101,6 +108,14 @@ jobs:echo "Yarn cache directory: $YARN_CACHE_DIR"echo "dir=$YARN_CACHE_DIR" >> $GITHUB_OUTPUT+ - name: Ensure that Cypress executable is ready+ run: |+ yarn cypress install+ yarn cypress cache path+ yarn cypress cache list+ yarn cypress verify+ shell: bash+- name: Update node_modules cacheuses: ./.github/actions/update-cachewith:@@ -112,5 +127,11 @@ jobs:- name: Update eslint cacheuses: ./.github/actions/update-cachewith:- path: .eslintcache+ path: ${{ github.workspace}}/.eslintcachekey: ${{ env.ESLINT_CACHE_KEY }}++ - name: Update Cypress cache+ uses: ./.github/actions/update-cache+ with:+ path: ~/.cache/Cypress+ key: ${{ env.CYPRESS_CACHE_KEY }}diff --git a/.github/workflows/drivers.yml b/.github/workflows/drivers.ymlindex 08cd86036f8..2e02ea75425 100644--- a/.github/workflows/drivers.yml+++ b/.github/workflows/drivers.yml@@ -27,21 +27,17 @@ jobs:# Fetch the base branch to ensure its history is available for diffinggit fetch --depth=1 origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}# Only run this if it's a pull request and the base ref exists- - name: Get Date- id: get-date- shell: bash- run: |- echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT- - name: Restore Babashka cache- uses: actions/cache@v4+ - name: Get cache keys+ uses: ./.github/actions/get-cache-keys+ id: get-cache-keys+ - name: Restore babashka cache+ uses: actions/cache/restore@v4with:path: |- ~/.m2~/.deps.clj- restore-keys: |- mage-drivers-- key: >-- mage-drivers-${{ steps.get-date.outputs.date }}+ ${{ github.workspace}}/bin/bb+ key: ${{ steps.get-cache-keys.outputs.m2-cache-key }}+- name: Check if driver tests should runid: check-branch-and-files-changedrun: |diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.ymlindex 62d21d93d3f..cb32a082587 100644--- a/.github/workflows/frontend.yml+++ b/.github/workflows/frontend.yml@@ -42,7 +42,7 @@ jobs:- name: Restore ESLint cacheuses: actions/cache/restore@v4with:- path: .eslintcache+ path: ${{ github.workspace}}/.eslintcachekey: ${{ steps.get-cache-keys.outputs.eslint-cache-key }}- name: Compile CLJS