55e66b2aab
更新所有工作流、脚本、Agent 指引中的 URL,重新生成 API token。 修复 git hooks 指向 Docker 路径。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
35 lines
858 B
YAML
35 lines
858 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: shell
|
|
steps:
|
|
- name: Checkout code from Gitea
|
|
run: |
|
|
git clone --depth 1 https://git.zywl.me/pzhang_zywl/document_analyzer.git .
|
|
git fetch origin ${{ github.sha }}
|
|
git checkout ${{ github.sha }}
|
|
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Run tests
|
|
run: python -m pytest -v
|
|
|
|
- name: Create issue on failure
|
|
if: failure()
|
|
env:
|
|
GITEA_API_TOKEN: ${{ secrets.D }}
|
|
run: >-
|
|
python scripts/create_failure_issue.py
|
|
--sha "${{ github.sha }}"
|
|
--branch "${{ github.ref_name }}"
|
|
--run "${{ github.run_number }}"
|
|
--message "${{ github.event.head_commit.message }}"
|