diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 5d6719ad..348cc77d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -20,6 +20,12 @@ on: pull_request: branches: [lotus] +# A superseded push cancels its in-flight run (same guard as cinny's ci.yml): +# rapid pushes to lotus otherwise queue one full build each on the shared runner. +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: # element-call's build:full sets 16384 already; keep parity for safety. NODE_OPTIONS: "--max-old-space-size=16384" @@ -48,6 +54,18 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile + # ── Quality gates (hard) — run BEFORE the slow build so a type/lint/ + # format/test error fails in seconds. Upstream replaced eslint+prettier + # with oxlint+oxfmt in v0.25.0; `pnpm lint` = tsc + oxlint + knip. + - name: Lint (tsc + oxlint + knip) + run: pnpm lint + + - name: Format check (oxfmt) + run: pnpm format:check + + - name: Unit tests + run: pnpm test:unit --run + - name: Build embedded # build:embedded writes to the repo-root dist/ (vite default outDir). # Stage it into embedded/web/dist — the publish template's "files" entry diff --git a/src/lotus/lotusDecorations.ts b/src/lotus/lotusDecorations.ts index e8c86c76..b0d2b900 100644 --- a/src/lotus/lotusDecorations.ts +++ b/src/lotus/lotusDecorations.ts @@ -84,8 +84,9 @@ export function startLotusDecorations(): () => void { emit(); }; w.lazyActions.on(LotusWidgetActions.Decorations, handler); - unregister = (): void => + unregister = (): void => { w.lazyActions.off(LotusWidgetActions.Decorations, handler); + }; } registrations += 1;