From cfa25738650603affc7e69653e7aad61c0b02cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tao=20Bojl=C3=A9n?= Date: Sat, 20 Jun 2026 14:44:33 +0100 Subject: [PATCH] ci(e2e): build Tailwind v4 via @tailwindcss/cli npm; single-branch CI The nixpkgs tailwindcss is a postcss-based CLI that can't resolve @import "tailwindcss"; use the official @tailwindcss/cli (Node, runs on Nix) installed --no-save in CI. Also trigger the gate on the dev branch directly so all CI iteration happens on one branch (revert to main-only before merge). Co-Authored-By: Claude Opus 4.8 (1M context) --- .tangled/workflows/e2e.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.tangled/workflows/e2e.yml b/.tangled/workflows/e2e.yml index 4afbe4f..2d1d861 100644 --- a/.tangled/workflows/e2e.yml +++ b/.tangled/workflows/e2e.yml @@ -2,8 +2,10 @@ # shadix_docs release (NOT mix dev), boots it, and runs the Playwright suite # (axe + regression) against it. Browser recipe confirmed by the a11y-ci-spike. when: + # NOTE: worktree-a11y-axe-ci is the in-development branch — remove it from this + # list before merging so the gate runs only on main + PRs. - event: ["push"] - branch: ["main"] + branch: ["main", "worktree-a11y-axe-ci"] - event: ["pull_request"] branch: ["main"] @@ -19,10 +21,10 @@ dependencies: - chromium - fontconfig - dejavu_fonts - # Nix-built tailwind/esbuild — the mix-managed downloads are glibc binaries - # that can't find the FHS loader on a minimal Nix image. config/config.exs - # points mix at these via TAILWIND_BIN/ESBUILD_BIN (set below). - - tailwindcss + # Nix-built esbuild (static Go binary, runs fine on Nix). Tailwind is handled + # via the @tailwindcss/cli npm package in the build step instead: the nixpkgs + # tailwindcss can't resolve `@import "tailwindcss"`, and the mix-managed + # standalone is a glibc binary that can't exec on a minimal Nix image. - esbuild environment: @@ -51,9 +53,12 @@ steps: mix local.hex --force && mix local.rebar --force mix deps.get --only docs (cd assets && npm install --no-audit --no-fund) - # Use the Nix-built tailwind/esbuild (runnable on this image) instead of the - # mix-managed glibc downloads (which can't exec on minimal Nix). - export TAILWIND_BIN="$(command -v tailwindcss)" + # Tailwind v4 via the official @tailwindcss/cli (Node — runs on Nix and + # resolves `@import "tailwindcss"` from node_modules). Installed --no-save + # so the repo's package.json (which targets the mix-managed standalone for + # local dev) is untouched. Pinned to the config/config.exs version. + (cd assets && npm install --no-save --no-audit --no-fund @tailwindcss/cli@4.1.13) + export TAILWIND_BIN="$PWD/assets/node_modules/.bin/tailwindcss" export ESBUILD_BIN="$(command -v esbuild)" echo "TAILWIND_BIN=$TAILWIND_BIN ESBUILD_BIN=$ESBUILD_BIN" mix assets.build -- 2.51.2