Files
composiohq__composio/.github/workflows/ts.examples.yml
Alberto Schiabel 5520cd69b1 ci: trigger SDK suites on dependency-resolution changes (#4220)
## Problem

A catalog pin or lockfile edit swaps what every package resolves,
without touching a file under `ts/**` or `python/**`. The path filters
on our suites did not account for that, so a dependency bump could skip
the very checks meant to catch it.

This is not hypothetical. In #4135, bumping `@composio/client` from
`0.1.0-alpha.76` to `2.0.0-rc.5` — a one-line change in
`pnpm-workspace.yaml` — ran **no TypeScript E2E at all**. That client
adds a credential-transport guard that refuses plain-HTTP credentials to
non-loopback hosts, which breaks `@e2e-tests/cli-toolkits-list` (the
harness serves its mock backend at
`http://host.docker.internal:${port}`). The PR was green throughout; the
breakage only surfaced when the suite was dispatched by hand.

`ts.test.yml` ran on that PR purely by luck, because the changeset file
matched `.changeset/**`.

## Change

Add the dependency-resolution inputs to every path-filtered SDK workflow
that lacked them:

| workflow | added |
| --- | --- |
| `ts.test-e2e.yml` | `pnpm-workspace.yaml`, `pnpm-lock.yaml` |
| `ts.test.yml` | `pnpm-workspace.yaml`, `pnpm-lock.yaml` |
| `ts.typecheck.yml` | `pnpm-workspace.yaml`, `pnpm-lock.yaml` |
| `ts.examples.yml` | `pnpm-workspace.yaml`, `pnpm-lock.yaml` |
| `py.check.yaml` | `python/pyproject.toml`, `uv.lock` |
| `py.test.yml` | `uv.lock` |

`ts.audit.yml` and `ts.build.yml` already listed both pnpm files and are
unchanged. `ts.release.yml` and `ts.examples-nightly.yml` have no path
filters.

`py.check.yaml` was the widest gap on the Python side: it matched only
`python/**/*.py`, so the `composio-client` pin bump in #4135 triggered
no ruff or mypy run.

## Verification

Every touched file still parses as YAML, and each of the six now matches
on the dependency inputs. The trade is more CI on lockfile-only changes,
which seems clearly worth it against a silent client swap.
2026-08-24 00:37:24 +02:00

74 lines
2.1 KiB
YAML

name: Examples TypeScript SDK
on:
push:
branches: [master, next]
paths:
- 'ts/examples/**'
- 'ts/packages/core/**'
- 'ts/packages/providers/**'
- '.oxlintrc.json'
- 'package.json'
- '.github/actions/setup-node-pnpm-bun/action.yml'
- '.github/workflows/ts.examples.yml'
- 'mise.toml'
- 'mise.lock'
- 'pnpm-workspace.yaml'
- 'pnpm-lock.yaml'
- 'turbo.jsonc'
pull_request:
branches: [master, next]
paths:
- 'ts/examples/**'
- 'ts/packages/core/**'
- 'ts/packages/providers/**'
- '.oxlintrc.json'
- 'package.json'
- '.github/actions/setup-node-pnpm-bun/action.yml'
- '.github/workflows/ts.examples.yml'
- 'mise.toml'
- 'mise.lock'
- 'pnpm-workspace.yaml'
- 'pnpm-lock.yaml'
- 'turbo.jsonc'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
examples:
name: Examples TypeScript SDK
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node.js, pnpm, Bun
uses: ./.github/actions/setup-node-pnpm-bun
with:
enable-turbo-cache: 'true'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
# Examples depend on the built @composio/* workspace packages for type
# resolution and the Workers bundle. turbo typecheck also builds these via
# ^build, but building explicitly keeps the wrangler step self-contained.
- name: Build SDK packages
run: pnpm run build:packages
- name: Typecheck examples
run: pnpm run typecheck:examples
- name: Lint examples
run: pnpm run lint:examples
# Prove the Cloudflare Workers entry bundles without secrets or deploying.
- name: Cloudflare Workers dry-run build
run: pnpm exec turbo cf:dry-run --filter='./ts/examples/*'