-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (54 loc) · 1.91 KB
/
Copy pathtest-delegate.yml
File metadata and controls
56 lines (54 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Purpose: Python delegate tests (pytest, pyflakes, pycodestyle).
# n8n-delegated per mandate M1 (see AGENTS.md §M1).
# Heavy work (pip install, pytest, pyflakes, pycodestyle) runs on the OCI
# free-tier VM via n8n. The only runner-side work is a lightweight `go vet`
# pre-check (~2s).
name: test-delegate
on:
push:
paths:
- 'src/sin_delegate/**'
- 'tests/test_delegate.py'
- 'tests/test_intelligence_multirepo.py'
- 'tests/test_scheduler_properties.py'
- 'tests/test_integration_e2e.py'
- 'tests/test_multirepo_saga.py'
- 'tests/test_mcp_serve.py'
- '.github/workflows/test-delegate.yml'
pull_request:
paths:
- 'src/sin_delegate/**'
- 'tests/test_delegate.py'
- 'tests/test_intelligence_multirepo.py'
- 'tests/test_scheduler_properties.py'
- 'tests/test_integration_e2e.py'
- 'tests/test_multirepo_saga.py'
- 'tests/test_mcp_serve.py'
workflow_dispatch:
jobs:
delegate:
name: Delegate delegate tests 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\":\"test-delegate\",\"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 delegate test/lint work delegated to n8n."