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

35 lines
867 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()
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 }}"