diff --git a/.gitea/workflows/xiaoqu-agent-service-ci.yml b/.gitea/workflows/xiaoqu-agent-service-ci.yml new file mode 100644 index 0000000..993860b --- /dev/null +++ b/.gitea/workflows/xiaoqu-agent-service-ci.yml @@ -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