Files
stack/.gitea/workflows/ci.yml
kert 04ec6693b3
All checks were successful
CI / skinny-install (aco) (push) Successful in 51s
CI / skinny-install (api) (push) Successful in 30s
CI / skinny-install (bcda) (push) Successful in 24s
CI / skinny-install (bib) (push) Successful in 25s
CI / skinny-install (bls) (push) Successful in 20s
CI / skinny-install (ccw) (push) Successful in 34s
CI / skinny-install (cli) (push) Successful in 27s
CI / skinny-install (cms) (push) Successful in 24s
CI / skinny-install (conf) (push) Successful in 25s
CI / skinny-install (pfs) (push) Successful in 25s
CI / skinny-install (rex) (push) Successful in 25s
CI / lint-test (push) Successful in 6m4s
Infra CI / notebooks (push) Successful in 7s
Infra CI / zotero (push) Successful in 7s
Infra CI / docs (push) Successful in 37s
Infra CI / api (push) Successful in 6s
Infra CI / mc (push) Successful in 7s
Deploy / build-scan-report (push) Successful in 4m0s
feat: auto-file Gitea issues on any CI workflow step failure
Add backend-agnostic CI failure reporter (api.diag.ci) and wire
`if: failure()` steps into every job across all generated workflows.

- src/api/diag/ci.py: CLI tool that files Gitea issues with workflow,
  job, run, commit context — works with Gitea Actions, GitHub Actions,
  and Woodpecker (takes args, not env-specific)
- dev/scripts/backends/gitea.py: _failure_step() added to all 6
  workflows (11 jobs total)
- dev/scripts/backends/github.py: same _failure_step() pattern for
  GitHub Actions backend
- .gitea/workflows/pkg-supply-chain.yml: manual failure step added
  (stale generated file)
- 6 new tests, 12,061 total passing

Now ANY step failure in ANY CI workflow on ANY backend will auto-create
a Gitea issue with the workflow name, job, run number, and commit SHA.
2026-03-24 22:15:26 -04:00

87 lines
2.4 KiB
YAML

# DO NOT EDIT — generated by gen_config.py from stack.toml
# Re-generate: uv run python dev/scripts/gen_config.py
name: CI
on:
push:
branches: ["**"]
pull_request:
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
env:
UV_INSTALL_DIR: /usr/local/bin
- name: Install dependencies
run: uv sync --dev
- name: Ruff check
run: uv run ruff check src/ tests/ --output-format=concise
- name: Ruff format
run: uv run ruff format --check src/ tests/
- name: Pytest
run: uv run pytest tests/ --cov=src --cov-report=term-missing --cov-fail-under=99 -q
- name: Validate generated config
run: uv run python dev/scripts/gen_config.py --check
- name: File failure issue
if: failure()
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
uv sync --no-dev --quiet 2>/dev/null || true
uv run python -m api.diag.ci \
--workflow "CI" --job "lint-test" \
--run "${{ github.run_number }}" \
--sha "${{ github.sha }}" \
--ref "${{ github.ref }}" || true
skinny-install:
runs-on: ubuntu-latest
strategy:
matrix:
extra: [conf, aco, api, bcda, bib, bls, ccw, cli, cms, pfs, rex]
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
env:
UV_INSTALL_DIR: /usr/local/bin
- name: Install stack[${{ matrix.extra }}]
run: uv sync --extra ${{ matrix.extra }}
- name: Verify import
run: uv run python -c "import ${{ matrix.extra }}"
- name: Run module tests
run: |
if [ -d "tests/${{ matrix.extra }}" ]; then
uv run pytest "tests/${{ matrix.extra }}/" -x -q || true
fi
- name: File failure issue
if: failure()
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
uv sync --no-dev --quiet 2>/dev/null || true
uv run python -m api.diag.ci \
--workflow "CI" --job "skinny-install" \
--run "${{ github.run_number }}" \
--sha "${{ github.sha }}" \
--ref "${{ github.ref }}" || true