Compare commits
4
Commits
server-v1.1.93
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b67d893b6 | ||
|
|
df63a06aea | ||
|
|
a024d5dcf6 | ||
|
|
98d6a67a5a |
@@ -105,20 +105,6 @@ jobs:
|
||||
fi
|
||||
echo "PATH=$TOOLDIR/node/bin:$PATH" >> "$GITEA_ENV"
|
||||
|
||||
- name: Install pnpm
|
||||
run: |
|
||||
export HOME="$RUNNER_WORKSPACE"
|
||||
# pnpm 随工具链缓存,避免每次重复下载
|
||||
TOOLDIR="$RUNNER_WORKSPACE/.lunar-toolchain"
|
||||
if [ ! -x "$TOOLDIR/pnpm/bin/pnpm" ]; then
|
||||
rm -rf "$TOOLDIR/pnpm"
|
||||
# 亚洲 runner 优先走 npmmirror,失败回落官方源
|
||||
npm install -g --prefix "$TOOLDIR/pnpm" --registry=https://registry.npmmirror.com pnpm@9 \
|
||||
|| npm install -g --prefix "$TOOLDIR/pnpm" --registry=https://registry.npmjs.org pnpm@9
|
||||
fi
|
||||
echo "PATH=$TOOLDIR/pnpm/bin:$PATH" >> "$GITEA_ENV"
|
||||
"$TOOLDIR/pnpm/bin/pnpm" --version
|
||||
|
||||
- name: Run Go tests
|
||||
working-directory: server
|
||||
run: |
|
||||
@@ -133,14 +119,18 @@ jobs:
|
||||
CI: "true"
|
||||
run: |
|
||||
export HOME="$RUNNER_WORKSPACE"
|
||||
# 用户级 npmrc:pnpm install 依赖下载走镜像源(lockfile 校验不受影响)
|
||||
# 依赖下载走 npmmirror;npm/pnpm 全局限定在部分 runner 不稳定,
|
||||
# 故不使用 pnpm 工作区——core 是独立包,npm install 即可构建
|
||||
npm config set registry https://registry.npmmirror.com || true
|
||||
# web/ 工作区:装依赖并构建 @lunar/core(web-commercial 的 file: 依赖)
|
||||
cd web
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm --filter @lunar/core build
|
||||
cd ../web-commercial
|
||||
pnpm install --frozen-lockfile
|
||||
# @lunar/core:web-commercial 的 file: 依赖与 vite/tsconfig 别名目标
|
||||
# --legacy-peer-deps:npm10 的 arborist 在 vitest 可选 peer 上会
|
||||
# edgesOut 崩溃,跳过 peer 解析即可(构建不需要)
|
||||
cd web/packages/core
|
||||
npm install --legacy-peer-deps
|
||||
npx tsup
|
||||
test -f dist/index.js
|
||||
cd ../../../web-commercial
|
||||
npm install --legacy-peer-deps
|
||||
npx tsc -b
|
||||
npx vite build
|
||||
test -f dist/index.html
|
||||
|
||||
Reference in New Issue
Block a user