add ui tests to ci
CI / Test + coverage (push) Successful in 1m33s

This commit is contained in:
2026-09-19 19:17:22 -09:00
parent 1926432fc6
commit 47f6cbf2d1
22 changed files with 2426 additions and 84 deletions
+13 -1
View File
@@ -2,7 +2,8 @@
# to ../resources/public/js (see ui/shadow-cljs.edn), i.e. /build/resources/public/js here.
# trixie, not bookworm: its default-jre is Java 21, which shadow-cljs's Closure Compiler
# requires (bookworm's is 17 -> UnsupportedClassVersionError).
FROM node:22-trixie-slim AS ui
# ui-base holds what the UI's release build and its tests share: the toolchain and the deps.
FROM node:22-trixie-slim AS ui-base
RUN apt-get update \
&& apt-get install -y --no-install-recommends default-jre-headless \
@@ -14,9 +15,20 @@ RUN npm ci
# Resolve the ClojureScript deps in their own layer so source edits don't re-download them.
COPY ui/shadow-cljs.edn ./
RUN npx shadow-cljs classpath > /dev/null
FROM ui-base AS ui
COPY ui/src ./src
RUN npx shadow-cljs release app
# The UI's tests, not part of the server image: `docker build --target ui-test`
# (script/docker-ui-test, script/docker-ui-coverage). Running the container runs the tests;
# `npm run coverage` (script/docker-ui-coverage) also writes the report to /build/target/coverage/ui.
FROM ui-base AS ui-test
COPY ui/.c8rc.json ./
COPY ui/src ./src
COPY ui/test ./test
CMD ["npm", "test"]
# Stage 2: the server.
# JDK 21+ is required by the MCP server (plumcp runs on virtual threads).
FROM clojure:temurin-21-tools-deps