e76f7c365b
- Replace workflow_run with same-workflow conditional job - Add create_failure_issue.py script for Gitea API integration - More reliable than cross-workflow triggers Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
37 lines
807 B
YAML
37 lines
807 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: shell
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Run tests
|
|
run: python -m pytest tests/ -v
|
|
|
|
create-issue-on-failure:
|
|
runs-on: shell
|
|
needs: test
|
|
if: failure()
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Create failure issue
|
|
shell: bash
|
|
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.GITEA_TOKEN }}"
|