ci: fix test worker and API upstream config
This commit is contained in:
+3
-1
@@ -17,7 +17,9 @@ RUN pnpm config set registry https://registry.npmmirror.com && \
|
||||
|
||||
COPY . .
|
||||
# Docker 构建时同机还会运行多项服务,限制 Vitest 并发以避免测试超时。
|
||||
RUN pnpm test -- --maxWorkers=1 && pnpm build
|
||||
# pnpm 会直接把脚本名后的参数传给 Vitest;额外的 `--` 会让 Vitest
|
||||
# 把 maxWorkers 当作位置参数,导致并发限制不生效。
|
||||
RUN pnpm test --maxWorkers=1 && pnpm build
|
||||
|
||||
# 运行阶段:仅保留构建产物和 Nginx,不包含源码或 node_modules。
|
||||
FROM nginx:1.27-alpine
|
||||
|
||||
Reference in New Issue
Block a user