Skip to content

docs(readme): rewrite See-it-in-action narratives in human voice, dro… #120

docs(readme): rewrite See-it-in-action narratives in human voice, dro…

docs(readme): rewrite See-it-in-action narratives in human voice, dro… #120

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install core package
run: pip install -e .
- name: Install test + integration dependencies
run: |
pip install pytest pytest-cov langgraph langchain-core fastapi pydantic uvicorn python-multipart httpx opentelemetry-api opentelemetry-sdk opentelemetry-exporter-otlp-proto-http
pip install claude-agent-sdk vercel-ai-sdk || echo "Optional SDK install failed (platform-specific), tests will skip"
- name: Run tests
run: pytest --cov=sponsio --cov-report=term-missing -v
test-typescript:
name: Test (TypeScript — native)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
- name: Install + Build TS SDK
working-directory: ts-sdk
run: npm install && npx tsc
- name: Run cross-language tests
working-directory: ts-sdk
run: node dist/__tests__/core.test.js
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
cache: pip
- name: Install ruff and dependencies
run: pip install ruff fastapi pydantic -e .
- name: Check formatting
run: ruff format --check sponsio/ api/ tests/
- name: Check linting
run: ruff check sponsio/ api/ tests/
- name: Check README/QUICKSTART command sync
run: |
# Canonical user-journey commands that must appear identically in
# both README.md (60-second version) and QUICKSTART.md (full
# walkthrough). Prevents CLI renames/drift from silently desyncing
# the two onboarding paths.
commands=(
"pip install sponsio"
"sponsio onboard"
"sponsio report"
"SPONSIO_MODE=enforce"
)
exit_code=0
for cmd in "${commands[@]}"; do
for file in README.md QUICKSTART.md; do
if ! grep -qF "$cmd" "$file"; then
echo "::error file=$file::Canonical command missing: $cmd"
exit_code=1
fi
done
done
exit $exit_code
- name: Check README collapsibles intact
run: |
# WYSIWYG markdown editors (Typora / Obsidian Live Preview / VS Code
# Markdown Editor / Cursor rich preview) silently strip <details>
# tags when they round-trip the file. Catch this before push.
# Expectation: 15 <details> blocks total —
# 3 in Quick start (TypeScript / One-shot prompt / Agent Skill)
# 4 in See it in action (one per scenario demo)
# 8 in Integrations (one per supported framework)
expected=15
opens=$(grep -c '^<details>' README.md || echo 0)
closes=$(grep -c '^</details>' README.md || echo 0)
if [ "$opens" -ne "$expected" ] || [ "$closes" -ne "$expected" ]; then
echo "::error file=README.md::Expected ${expected} <details>/</details> pairs, found ${opens} open / ${closes} close. WYSIWYG markdown editor likely stripped them — re-add, or edit only in plain-text source mode."
exit 1
fi
# Sanity: required summary labels (one per collapsible)
required_summaries=(
"<summary><b>TypeScript</b></summary>"
"<summary><b>One-shot prompt</b>"
"<summary><b>Install as an Agent Skill</b></summary>"
"<summary><b>1. Coding"
"<summary><b>2. Infra"
"<summary><b>3. Finance"
"<summary><b>4. Coding"
"<summary><b>No framework</b>"
"<summary><b>LangGraph / LangChain.js</b>"
"<summary><b>Claude Agent SDK</b>"
"<summary><b>OpenAI SDK</b>"
"<summary><b>OpenAI Agents SDK</b>"
"<summary><b>Vercel AI SDK</b>"
"<summary><b>CrewAI</b>"
"<summary><b>MCP</b>"
)
missing=0
for s in "${required_summaries[@]}"; do
if ! grep -qF "$s" README.md; then
echo "::error file=README.md::Required collapsible summary missing: $s"
missing=1
fi
done
[ "$missing" -eq 0 ]