fix: 收口审查发现的 CI 与授权边界
将 admin identity helper 移到共享边界,清理跨 feature 导入;修复 CI 集成环境、浏览器数据库/Playwright 配置;增强 doctor source hash 对重命名文件的处理,并补充 logout API 文档。
This commit is contained in:
1 parent
bd129a3069
commit
0788480ce3
12 files changed
+35
-16
No files matched your search
@@ -87,6 +87,15 @@ jobs:
|
||||
node-version: 24
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- name: Prepare API test env
|
||||
working-directory: apps/api
|
||||
run: |
|
||||
cat > .env <<EOF
|
||||
DATABASE_URL=$DATABASE_URL
|
||||
DEFAULT_BRAND_ID=$DEFAULT_BRAND_ID
|
||||
SESSION_SECRET=$SESSION_SECRET
|
||||
SEED_ADMIN_PASSWORD=$SEED_ADMIN_PASSWORD
|
||||
EOF
|
||||
- run: pnpm --filter @personal-brand/api test:integration
|
||||
|
||||
taro:
|
||||
@@ -147,9 +156,18 @@ jobs:
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm --filter @personal-brand/taro exec playwright install --with-deps chromium
|
||||
- name: Prepare API test env
|
||||
working-directory: apps/api
|
||||
run: |
|
||||
cat > .env <<EOF
|
||||
DATABASE_URL=$DATABASE_URL
|
||||
DEFAULT_BRAND_ID=$DEFAULT_BRAND_ID
|
||||
SESSION_SECRET=$SESSION_SECRET
|
||||
SEED_ADMIN_PASSWORD=$SEED_ADMIN_PASSWORD
|
||||
EOF
|
||||
- run: pnpm --filter @personal-brand/api db:migrate:deploy
|
||||
- run: pnpm --filter @personal-brand/api db:seed
|
||||
- run: pnpm --filter @personal-brand/api test:integration
|
||||
env:
|
||||
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/personal_brand
|
||||
- name: Start API
|
||||
run: pnpm --filter @personal-brand/api start > /tmp/api.log 2>&1 &
|
||||
env:
|
||||
@@ -175,3 +193,5 @@ jobs:
|
||||
curl --retry 30 --retry-delay 1 --retry-connrefused -fsS http://localhost:3002
|
||||
curl --retry 30 --retry-delay 1 --retry-connrefused -fsS http://localhost:3000
|
||||
- run: pnpm --filter @personal-brand/taro exec playwright test --config=playwright.config.ts --reporter=line
|
||||
env:
|
||||
ADMIN_URL: http://localhost:3000
|
||||
Reference in new issue
Block a user