From d203e7a33ef52e12dbb5132d4f116aaff487e10e Mon Sep 17 00:00:00 2001 From: Lotus CI Date: Sat, 12 Sep 2026 14:24:43 -0400 Subject: [PATCH] ci(lotus): scope VITE_APP_VERSION to the build step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA --- .gitea/workflows/ci.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c2f70997..e57bce54 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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