Files
document_analyzer/.gitea/workflows/ci.yml
T
2026-05-29 22:05:14 +08:00

30 lines
819 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 http://localhost:3000/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 tests/ -v
- name: Create issue on failure
if: failure()
shell: cmd
run: |
python scripts/create_failure_issue.py --sha "${{ github.sha }}" --branch "${{ github.ref_name }}" --run "${{ github.run_number }}" --message "${{ github.event.head_commit.message }}" --api-token "${{ secrets.D }}"