FROM alpine:3.22 AS sqlite-tools RUN apk add --no-cache sqlite FROM node:24-trixie-slim AS frontend-assets WORKDIR /src/frontend COPY frontend/package*.json ./ RUN npm ci COPY frontend/ ./ RUN npm run build FROM golang:1.26-trixie AS go-test WORKDIR /src COPY go.mod go.sum ./ RUN go mod download COPY . . COPY --from=frontend-assets /src/internal/webui/static ./internal/webui/static CMD ["go", "test", "-race", "-timeout=20m", "./..."] FROM golangci/golangci-lint:v2.12.2 AS go-lint WORKDIR /src COPY go.mod go.sum ./ RUN go mod download COPY . . COPY --from=frontend-assets /src/internal/webui/static ./internal/webui/static CMD ["golangci-lint", "run", "./..."] FROM node:24-trixie-slim AS frontend-test WORKDIR /src/frontend COPY frontend/package*.json ./ RUN npm ci COPY frontend/ ./ CMD ["sh", "-c", "npm run typecheck && npm test && npm run build"]