Skip to content

fix: route plain-text sin review safely #216

fix: route plain-text sin review safely

fix: route plain-text sin review safely #216

Workflow file for this run

# Purpose: Python CI for the sin-code-bundle package: ruff lint/format, pytest
# across Python 3.11/3.12/3.13, and optional extras smoke tests.
# n8n-delegated per mandate M1 (see AGENTS.md §M1).
# Heavy work (pip install, pytest, ruff) runs on the OCI free-tier VM via n8n.
# The only runner-side work is a lightweight `go vet` pre-check (~2s).
name: ci
on:
push:
branches: ["main"]
paths:
- "**.py"
- "pyproject.toml"
- "setup.py"
- "setup.cfg"
- "requirements*.txt"
pull_request:
branches: ["main"]
paths:
- "**.py"
- "pyproject.toml"
- "setup.py"
- "setup.cfg"
- "requirements*.txt"
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
delegate:
name: Delegate Python CI to n8n
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Trigger n8n webhook
env:
N8N_CI_WEBHOOK_URL: ${{ secrets.N8N_CI_WEBHOOK_URL }}
run: |
if [[ -z "$N8N_CI_WEBHOOK_URL" ]]; then
echo "::error::N8N_CI_WEBHOOK_URL secret is not configured"
exit 1
fi
curl -fsS -X POST \
-H "Content-Type: application/json" \
-d "{\"workflow\":\"ci\",\"ref\":\"${{ github.ref }}\",\"sha\":\"${{ github.sha }}\",\"repo\":\"${{ github.repository }}\",\"actor\":\"${{ github.actor }}\"}" \
"$N8N_CI_WEBHOOK_URL"
- name: Local pre-check (go vet)
run: |
go version
go vet ./cmd/sin-code/...
echo "Heavy Python lint/test work delegated to n8n."