Compare commits

...

1 Commits

Author SHA1 Message Date
Nicolo-Maria
2274abd4f4 refactor: Remove cache-hit output from Prepare Static Viz Bundle action 2025-08-06 18:16:04 +02:00
4 changed files with 44 additions and 50 deletions

View File

@@ -0,0 +1,29 @@
name: Prepare Static Viz Bundle
description: Builds static-viz bundle with caching
runs:
using: "composite"
steps:
- name: Get static-viz bundle cache
uses: actions/cache@v4
id: cache
with:
path: resources/frontend_client/app/dist
key: static-viz-bundle-${{ github.sha }}
- name: Prepare front-end environment
if: steps.cache.outputs.cache-hit != 'true'
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
if: steps.cache.outputs.cache-hit != 'true'
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "static-viz"
- name: Build static-viz frontend
if: steps.cache.outputs.cache-hit != 'true'
run: yarn build-static-viz
shell: bash
env:
MB_EDITION: ee

View File

@@ -36,7 +36,7 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "eastwood"
m2-cache-key: 'eastwood'
- run: clojure -X:dev:ee:ee-dev:drivers:drivers-dev:test:eastwood
name: Run Eastwood linter
@@ -109,19 +109,9 @@ jobs:
with:
m2-cache-key: be-tests
java-version: "${{ matrix.java-version }}"
# Depending on which files changed, we might either have to build static-viz
# from scratch or download the previously built artifact
- name: Build static-viz frontend
- name: Prepare static-viz bundle
if: ${{ matrix.job.build-static-viz == 'true' && !inputs.skip }}
run: yarn build-static-viz
env:
MB_EDITION: ${{ matrix.job.edition }}
- name: Download Static Viz Bundle Artifact
if: ${{ matrix.job.build-static-viz == 'true' && !inputs.skip }}
uses: actions/download-artifact@v4
with:
name: static-viz-bundle-${{ github.sha }}
path: resources/frontend_client/app/dist
uses: ./.github/actions/prepare-static-viz
- name: "Test Java ${{ matrix.java-version }} ${{ matrix.job.name }}"
id: run-java-tests

View File

@@ -24,6 +24,7 @@ jobs:
frontend_all: ${{ steps.changes.outputs.frontend_all }}
frontend_sources: ${{ steps.changes.outputs.frontend_sources }}
documentation: ${{ steps.changes.outputs.documentation }}
visualizations: ${{ steps.changes.outputs.visualizations }}
steps:
- uses: actions/checkout@v4
- name: Test which files changed
@@ -35,53 +36,21 @@ jobs:
list-files: csv
filters: .github/file-paths.yaml
static-viz-files-changed:
name: Check whether static-viz files changed
if: ${{ !contains(github.event.pull_request.labels.*.name,'ci skip') }}
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
static_viz: ${{ steps.static_viz.outputs.static_viz }}
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "files-changed"
- name: Build static-viz frontend
run: yarn build-static-viz
env:
MB_EDITION: ee
- name: Upload Static Viz Bundle Artifact
uses: actions/upload-artifact@v4
with:
name: static-viz-bundle-${{ github.sha }}
path: resources/frontend_client/app/dist
- name: Check for static viz changes
uses: dorny/paths-filter@v3.0.0
id: static_viz
with:
token: ${{ github.token }}
filters: .github/static-viz-sources.yaml
uberjar:
needs: [files-changed, static-viz-files-changed]
needs: [files-changed]
if: ${{ !cancelled() && !(needs.files-changed.outputs.documentation == 'true' && needs.files-changed.outputs.backend_all == 'false' && needs.files-changed.outputs.frontend_all == 'false' && needs.files-changed.outputs.e2e_all == 'false') }}
uses: ./.github/workflows/uberjar.yml
secrets: inherit
with:
source_changed: ${{ needs.files-changed.outputs.backend_all == 'true' || needs.files-changed.outputs.frontend_all == 'true' || needs.static-viz-files-changed.outputs.static_viz == 'true' }}
source_changed: ${{ needs.files-changed.outputs.backend_all == 'true' || needs.files-changed.outputs.frontend_all == 'true' || needs.files-changed.outputs.visualizations == 'true' }}
backend-tests:
if: ${{ !cancelled() }}
needs: [files-changed, static-viz-files-changed]
needs: [files-changed]
uses: ./.github/workflows/backend.yml
secrets: inherit
with:
skip: ${{ needs.files-changed.outputs.backend_all != 'true' && needs.static-viz-files-changed.outputs.static_viz != 'true' }}
skip: ${{ needs.files-changed.outputs.backend_all != 'true' && needs.files-changed.outputs.visualizations != 'true' }}
app-db-tests:
needs: files-changed

View File

@@ -170,7 +170,7 @@ jobs:
env:
MB_EDITION: ${{ matrix.edition }}
INTERACTIVE: false
SKIP_LICENSES: ${{ github.event_name == 'pull_request' }} # faster builds for dev
SKIP_LICENSES: ${{ github.event_name == 'pull_request' }} # faster builds for dev
steps:
- name: Check out the code
uses: actions/checkout@v4
@@ -185,8 +185,14 @@ jobs:
with:
m2-cache-key: uberjar
java-version: "${{ needs.get-build-requirements.outputs.java_version || 21 }}"
# Build static-viz bundle with caching
- name: Prepare static-viz bundle
uses: ./.github/actions/prepare-static-viz
- name: Build
run: ./bin/build.sh
- name: Prepare uberjar artifact
uses: ./.github/actions/prepare-uberjar-artifact
with: