Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -1,8 +1,7 @@
name: Bundle Budget
# Gitea variant of .github/workflows/bundle-budget.yml. Uses Gitea-API to
# post / upsert a sticky PR comment with per-route gzip sizes.
# Docs: docs/architecture/bundle-budgets.md
# Enforces aggregate bundle budgets for pull requests. The current report and
# its comparison with the latest cached main baseline are attached to the run.
on:
pull_request:
@@ -22,14 +21,20 @@ on:
- "pnpm-lock.yaml"
- "scripts/bundle-budgets.json"
- "scripts/verify-bundle-size.mjs"
- "scripts/render-bundle-budget-comment.mjs"
- ".gitea/workflows/bundle-budget.yml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
HIVEGRID_GITEA_HOST_IP: ${{ vars.HIVEGRID_GITEA_HOST_IP }}
jobs:
measure:
name: Measure & report bundle sizes
name: Measure and report bundle sizes
runs-on: toolctrl-ci
timeout-minutes: 30
env:
@@ -45,56 +50,65 @@ jobs:
printf '%s git.tool-ctrl.de\n' "$HIVEGRID_GITEA_HOST_IP" >> /etc/hosts
fi
- name: Checkout PR head
uses: actions/checkout@v4
- name: Checkout pull request
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: .nvmrc
- name: Persist Node.js toolchain
run: bash scripts/ci/persist-node-toolchain.sh
- name: Enable Corepack
run: corepack enable
run: corepack enable --install-directory /usr/local/bin
- name: Prepare pnpm 10.33.0
run: corepack prepare pnpm@10.33.0 --activate
- name: Prepare pnpm 11.12.0
run: corepack prepare pnpm@11.12.0 --activate
- name: Configure pnpm store
run: pnpm config set store-dir .pnpm-store
- name: Cache pnpm store
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: .pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Restore latest main bundle baseline
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: baseline/main-bundle-report.json
key: bundle-baseline-pr-${{ gitea.sha }}
restore-keys: |
bundle-baseline-main-
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build web (PR head)
- name: Build web
run: pnpm --filter @hivegrid/web build
- name: Verify aggregate bundle budgets
run: pnpm run verify:bundle-size
- name: Measure PR bundle sizes
- name: Measure bundle sizes
if: always()
run: node scripts/verify-bundle-size.mjs --json > pr-bundle-report.json
- name: Render PR comment markdown
# Baseline download from Gitea artifact storage is opt-in via
# BUNDLE_BASELINE_URL; falls back to no-diff mode otherwise.
run: |
if [ -n "${BUNDLE_BASELINE_URL:-}" ]; then
curl -sSfL "$BUNDLE_BASELINE_URL" -o main-bundle-report.json || true
fi
node scripts/render-bundle-budget-comment.mjs \
--current pr-bundle-report.json \
--baseline main-bundle-report.json \
--out bundle-comment.md
env:
BUNDLE_BASELINE_URL: ${{ vars.BUNDLE_BASELINE_URL }}
- name: Render bundle report
if: always()
run: node scripts/render-bundle-budget-comment.mjs --current pr-bundle-report.json --baseline baseline/main-bundle-report.json --out bundle-report.md
- name: Upsert Gitea PR comment
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_HOST: ${{ vars.GITEA_HOST || 'git.tool-ctrl.de' }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
run: node scripts/post-bundle-budget-gitea-comment.mjs
- name: Upload bundle report
if: always()
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3
with:
name: bundle-report-pr-${{ gitea.run_id }}
path: |
pr-bundle-report.json
bundle-report.md
retention-days: 14