ci(P0④): CI 孤儿迁 Gitea Actions + JDK21 + ci 旁路 profile

.github/workflows/ci.yml(GHA 语法在 Gitea 上孤儿+JDK17 写死)迁至 .gitea/workflows/ci.yml(JDK21)。ci.sh 起服务加 --spring.profiles.active=ci(配合 P0① fail-safe,否则健康检查 401/对拍免令牌失效)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-25 11:41:21 +08:00
parent bc9ae8cf44
commit 1a0985ffa5
2 changed files with 14 additions and 3 deletions

View File

@@ -1,4 +1,11 @@
# eip4-platform CI:编译+单测+ArchUnit+对拍冒烟(公司自建 Git 服务可换 Jenkins,步骤同 scripts/ci.sh)
# eip4-platform CI(Gitea Actions)。
#
# P0 修复(2026-06-24 架构评审):原 .github/workflows/ci.yml 在 Gitea(git.latent.chat)上是孤儿
# (GitHub Actions 不会跑),且 java-version 写死 17(项目 JDK21)。本文件迁到 Gitea 规范位置
# .gitea/workflows/,JDK 升 21。
#
# 前置条件:Gitea 实例需已启用 Actions 且注册了带 `ubuntu-latest` 标签的 act_runner;
# 否则本工作流不会被调度(纯文件存在不等于会跑)。详见仓库 Actions 设置。
name: ci
on:
push:
@@ -23,9 +30,9 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
java-version: "21"
cache: maven
- name: 编译+单测+对拍冒烟
- name: 编译+单测(含 ArchUnit)+对拍冒烟
env:
CI_PG_HOST: localhost
CI_PG_PORT: "5433"

View File

@@ -32,7 +32,11 @@ psql -h "$CI_PG_HOST" -p "$CI_PG_PORT" -U "$CI_PG_USER" -d "$CI_DB" -q \
JDBC="jdbc:postgresql://${CI_PG_HOST}:${CI_PG_PORT}/${CI_DB}"
echo "==[3/4] 起服务(:${CI_PORT} → ${JDBC})=="
# profile=ci:对拍冒烟依赖免令牌 permitAll + asUser/roles 旁路(见 SecurityProfiles)。
# P0 fail-safe 修复后默认严格链(无 profile=强制认证),故 CI 必须显式声明 ci profile,
# 否则健康检查 /api/entity/... 被拒 401、ParityCli 免令牌重放失效。
java -jar platform-app/target/platform-app-*.jar \
--spring.profiles.active=ci \
--server.port="$CI_PORT" \
--spring.datasource.url="$JDBC" \
--spring.datasource.username="$CI_PG_USER" \