ci: build Tailwind CSS in Check workflow so asset! resolves (VAPP-1) #1
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/ci-tailwind-build"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
src/main.rs:43invokesasset!("/assets/tailwind-built.css"). The Dioxus 0.7.9asset!macro validates file existence at compile time.assets/tailwind-built.cssis git-ignored and generated bybun run tailwindcss, so a fresh CI checkout has nothing on disk andcargo test --features server --bin vervain-appfails compile:error: Asset at /assets/tailwind-built.css doesn't exist. Localjust checkonly passed because a stale build fromdx servelived in the working tree (andcheckhad nocargo teststep). Same defect lives ina8n-tools/yotun; fixed there in a parallel PR (EC-2).Changes:
.forgejo/workflows/check.yml: add aBuild Tailwind CSSstep (bun install --frozen-lockfile && bun run tailwindcss ...) before the cargo steps. Pass--features serverto clippy and the server-sidecargo check, matching how yotun PR #68 fixed its dead-code wall.justfile:build-cssnow runsbun install --frozen-lockfileso a fresh clone generates the CSS in one step.checkdepends onbuild-cssand runs a newcheck-testrecipe so the local pipeline matches CI step-for-step.check-clippyandcheck-serverswitch to--features server.Closes VAPP-1.
Test plan
rm assets/tailwind-built.css && just checkfrom a clean state - passes locally (cargo test reports0 passed; 0 failed, binary has no tests yet but the asset macro now resolves).Checkworkflow goes green on this PR (first successful run for this workflow in the repo).`src/main.rs:43` invokes `asset!("/assets/tailwind-built.css")`. The Dioxus 0.7.9 `asset!` macro validates file existence at compile time; `assets/tailwind-built.css` is git-ignored and generated by `bun run tailwindcss`. CI clones fresh and never builds CSS, so `cargo test --features server --bin vervain-app` fails compile: `error: Asset at /assets/tailwind-built.css doesn't exist`. Local `just check` passes only because a stale build sits in the working tree (and `check` had no `cargo test` step). `.forgejo/workflows/check.yml`: add a `Build Tailwind CSS` step (`bun install --frozen-lockfile && bun run tailwindcss ...`) before the cargo steps. Pass `--features server` to clippy and the server-side `cargo check` so server-gated code is exercised; matches yotun PR #68 (a8n-tools/yotun). `justfile`: `build-css` now runs `bun install --frozen-lockfile` so a fresh clone generates `tailwind-built.css` without the separate `install` step. `check` depends on `build-css` and gains `check-test` (`cargo test --features server --bin vervain-app`), so the recipe matches CI step-for-step. `check-clippy` and `check-server` switch to `--features server`. Same defect lives in `a8n-tools/yotun`; fixed in a separate PR there. #VAPP-1 State Done