统一仪表盘、AI 回复、卡密、扫码和通知等前后端行为,补齐并发与失败恢复测试。新增 MySQL 8.4、PostgreSQL 17 持久化 Docker 功能测试和 SQLite 脱敏播种工具。
32 lines
798 B
Docker
32 lines
798 B
Docker
# syntax=docker/dockerfile:1.7
|
|
|
|
FROM node:22-trixie 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:22-trixie AS frontend-test
|
|
WORKDIR /src/frontend
|
|
COPY frontend/package*.json ./
|
|
RUN npm ci
|
|
COPY frontend/ ./
|
|
CMD ["sh", "-c", "npm test && npm run build"]
|