Files
reno-stars-coordinator/.gitea/workflows/ci.yml
T
renostars f43f815399
ci / reno-work MCP — per-function unit tests (push) Successful in 12s
feat: autonomous quote-build tools (list_catalog + build_quote) + /api path fix
Approach A (design doc committed 866d349): the coordinator assembles + publishes
quotes autonomously via 2 thin HTTP tools over the invoice-service, same pattern
as get_payment_status. Also fixes a real bug — get_payment_status hit
{base}/invoices/:id (404; the bearer surface is under /api) and never worked;
all invoice_client paths now use /api. quoting SKILL + root SKILL updated to the
new flow; obsolete "build_quote not in reno-work" guard inverted. 145 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-01 17:51:59 -07:00

49 lines
1.8 KiB
YAML

# ci.yml — per-function CI for the reno-work work-MCP.
#
# Complements .github/workflows/enterskill-gate.yml (structural manifest lint):
# this job unit-tests every one of the 12 MCP tools with NO live Odoo and NO
# network — mcp/test_server.py stubs the module-level _odoo with a recording
# fake and asserts the exact Odoo JSON-2 payload shape (writes) / search domain
# (reads), plus the MCP stdio protocol. Live writes are impossible in CI
# (RENO_WORK_DRY_RUN gating + the stub), so it is safe and hermetic.
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
mcp-unit:
name: reno-work MCP — per-function unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install pytest
run: pip install --quiet pytest
- name: Unit-test every MCP tool (no live Odoo)
run: pytest mcp/ -v
- name: stdio protocol smoke (real process — initialize + tools/list)
run: |
out=$(printf '%s\n%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| python3 mcp/server.py)
echo "$out"
echo "$out" | grep -q '"name": "reno-work"' || { echo "FAIL: no reno-work serverInfo"; exit 1; }
echo "$out" | python3 -c "import sys,json; \
rows=[json.loads(l) for l in sys.stdin if l.strip()]; \
tools=[r for r in rows if r.get('id')==2][0]['result']['tools']; \
assert len(tools)>=33, f'expected >=33 tools, got {len(tools)}'; \
print(f'stdio smoke OK: {len(tools)} tools')"