Files
AI-Check-Test/.gitea/workflows/api-change-check.yml
dongzi 556f5b8ab6
Some checks failed
API Parameter Change Check / api-param-check (push) Failing after 3s
test
2026-06-03 15:02:21 +08:00

63 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Gitea Actionspush 后检测 Controller 接口参数变更
# 工具代码与配置均位于 .gitea/ 目录,与业务代码解耦
name: API Parameter Change Check
on:
push:
branches:
- '**'
jobs:
api-param-check:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 检查配置文件
run: |
if [ ! -f .gitea/config.yaml ]; then
echo "错误: 缺少 .gitea/config.yaml"
exit 1
fi
echo "使用 .gitea/config.yaml"
- name: 安装 Java 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
cache: maven
- name: 安装 Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: 构建 AST 解析器
working-directory: .gitea/java-parser
run: mvn -q package -DskipTests
- name: 安装 Python 依赖
run: pip install -r .gitea/checker/requirements.txt
- name: 检测 Controller 接口参数变更
run: |
python .gitea/checker/main.py \
--config .gitea/config.yaml \
--repo-root . \
"${{ gitea.actor }}" \
"$(git log -1 --format=%ci)"
- name: 上传变更日志
if: always()
uses: actions/upload-artifact@v4
with:
name: api-change-logs
path: .gitea/logs/api-changes/
if-no-files-found: ignore