ci(lotus): scope VITE_APP_VERSION to the build step
CI / Build embedded bundle (push) Successful in 3m3s
CI / Publish to Gitea npm registry (push) Failing after 44s

Run #1859: install, tsc, oxlint, knip and oxfmt all passed; the unit
suite then failed 1/648 — DeveloperSettingsTab's snapshot expects the
version to read "dev" when VITE_APP_VERSION is unset, but the workflow
exported it (= "lotus") at workflow level, so it leaked into the tests.
Set it on the two build steps only, which is the only place it matters.
Reproduced locally: the test fails with the variable set and passes
without it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
Lotus CI
2026-09-12 14:24:43 -04:00
co-authored by Claude Opus 5
parent f111d1d2aa
commit d203e7a33e
+12 -2
View File
@@ -29,8 +29,6 @@ concurrency:
env:
# element-call's build:full sets 16384 already; keep parity for safety.
NODE_OPTIONS: "--max-old-space-size=16384"
# Stamp the build so analytics/rageshakes aren't labelled "dev".
VITE_APP_VERSION: ${{ github.ref_name }}
jobs:
build:
@@ -86,6 +84,12 @@ jobs:
# Stage it into embedded/web/dist — the publish template's "files" entry
# — so the smoke-check and npm publish both see the bundle.
# (embedded/web/dist is gitignored, hence the explicit copy.)
# VITE_APP_VERSION stamps the bundle so analytics/rageshakes aren't
# labelled "dev". Scoped to the build step only: at workflow level it
# also reached the unit tests, whose DeveloperSettingsTab snapshot
# expects the unset ("dev") value (run #1859).
env:
VITE_APP_VERSION: ${{ github.ref_name }}
run: |
pnpm run build:embedded
rm -rf embedded/web/dist
@@ -151,6 +155,12 @@ jobs:
# Stage it into embedded/web/dist — the publish template's "files" entry
# — so the smoke-check and npm publish both see the bundle.
# (embedded/web/dist is gitignored, hence the explicit copy.)
# VITE_APP_VERSION stamps the bundle so analytics/rageshakes aren't
# labelled "dev". Scoped to the build step only: at workflow level it
# also reached the unit tests, whose DeveloperSettingsTab snapshot
# expects the unset ("dev") value (run #1859).
env:
VITE_APP_VERSION: ${{ github.ref_name }}
run: |
pnpm run build:embedded
rm -rf embedded/web/dist