a8964db151
CI / test (pull_request) Successful in 18s
- 新增 _get_gitea_config.py 从 YAML 读取 URL/repo/token
- _common.sh 改为通过 eval python 脚本加载配置
- GITEA_CICD_SETUP.md / DEV_AGENT.md / QE_AGENT.md 更新文档
- CI 工作流改用 ${{ gitea.server_url }} / ${{ gitea.repository }}
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
37 lines
947 B
YAML
37 lines
947 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 ${{ gitea.server_url }}/${{ gitea.repository }}.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 }}"
|
|
--gitea-url "${{ gitea.server_url }}"
|
|
--repo "${{ gitea.repository }}"
|
|
--message "${{ github.event.head_commit.message }}"
|