chore(cicd): 添加 Gitea Actions 测试门禁 (REQ-20260908-0006)
xiaoqu-agent-service CI / test (pull_request) Canceled after 0s

This commit is contained in:
xqzp2026
2026-09-09 11:39:20 +09:30
parent aa4cc26416
commit 7c2b159aba
@@ -0,0 +1,46 @@
name: xiaoqu-agent-service CI
on:
workflow_dispatch:
pull_request:
branches: [main]
paths:
- "xiaoqu-agent-service/**"
- ".gitea/workflows/xiaoqu-agent-service-ci.yml"
push:
branches:
- main
paths:
- "xiaoqu-agent-service/**"
- ".gitea/workflows/xiaoqu-agent-service-ci.yml"
concurrency:
group: xiaoqu-agent-service-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: self-hosted
timeout-minutes: 15
defaults:
run:
shell: bash
working-directory: xiaoqu-agent-service
steps:
- name: Checkout
shell: bash
working-directory: ${{ github.workspace }}
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
git init .
git remote remove origin 2>/dev/null || true
git remote add origin https://gitea.ququclean.com/wangheng/xiaoqu_mcp_service.git
git -c credential.helper= \
-c 'credential.helper=!f() { test "$1" = get || exit 0; printf "%s\n" "username=x-access-token" "password=$GITHUB_TOKEN"; }; f "$@"' \
fetch --depth=1 origin "${{ github.sha }}"
git checkout --force --detach FETCH_HEAD
- name: Test
run: ./mvnw test