Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
yml 74 lines 2.48 KB
Raw
1 name: Docs - SDK reference drift
2
3 # Regenerates both SDK references from the PR's sources and fails when the committed
4 # output differs, so generator changes and stale references surface here rather than in
5 # a release PR. It runs the generators against PR code, so it gets read-only contents
6 # access and no secrets.
7 on:
8 pull_request:
9 branches: [next]
10 paths:
11 - 'ts/packages/core/src/**'
12 - 'ts/packages/core/scripts/generate-docs.ts'
13 - 'ts/packages/core/package.json'
14 - 'pnpm-lock.yaml'
15 - 'patches/**'
16 - 'python/composio/**'
17 - 'python/scripts/generate-docs.py'
18 - 'python/pyproject.toml'
19 - 'uv.lock'
20 - 'docs/content/reference/sdk-reference/**'
21 - '.github/actions/setup-node-pnpm-bun/action.yml'
22 - '.github/actions/setup-python-uv/action.yml'
23 - '.github/workflows/docs-sdk-reference-drift.yml'
24 - 'mise.toml'
25 - 'mise.lock'
26
27 concurrency:
28 group: ${{ github.workflow }}-${{ github.ref }}
29 cancel-in-progress: true
30
31 permissions:
32 contents: read
33
34 jobs:
35 drift:
36 name: SDK reference drift
37 runs-on: ubuntu-latest
38 timeout-minutes: 15
39 steps:
40 - name: Checkout repository
41 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
42 with:
43 persist-credentials: false
44
45 - name: Setup Node.js, pnpm, Bun
46 uses: ./.github/actions/setup-node-pnpm-bun
47 with:
48 cache-save: 'false'
49
50 - name: Setup Python and uv
51 uses: ./.github/actions/setup-python-uv
52 with:
53 enable-caching: 'false'
54
55 - name: Install dependencies
56 run: pnpm install --frozen-lockfile --ignore-scripts
57
58 - name: Regenerate the TypeScript reference
59 run: pnpm --filter @composio/core generate:docs
60
61 - name: Regenerate the Python reference
62 working-directory: python
63 run: uv run --frozen --only-group docs-reference python scripts/generate-docs.py
64
65 - name: Check for drift
66 run: |
67 changed=$(git status --porcelain --untracked-files=all -- docs/content/reference/sdk-reference)
68 if [[ -n "$changed" ]]; then
69 echo "::error::The committed SDK reference is out of date with its sources."
70 echo "$changed"
71 git diff --stat -- docs/content/reference/sdk-reference
72 echo "Regenerate with: pnpm --filter @composio/core generate:docs && (cd python && uv run --frozen --only-group docs-reference python scripts/generate-docs.py)"
73 exit 1
74 fi