mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
9ca2fc6d9d
## CI hygiene fixes Four direct-fix items surfaced during the 2026-04-16 QA/E2E blitz, bundled as one PR with one commit per fix: 1. **`test_unit.yml` paths-ignore** — add `showcase/**` + `sdk-python/**` (prevents spurious TS unit matrix runs on showcase-only or sdk-python-only PRs). `sdk-python-old/**` was mentioned in the plan but doesn't exist on main; only the two existing dirs are added. 2. **`test_doc-examples.yml`** — scope PR trigger to `branches: [main]` (matches convention of other workflows). 3. **`e2e_dojo.yml`** — symmetric `.changeset` path filter on push+PR (was asymmetric — already in the `dorny/paths-filter` step's `ts:` list, so this aligns the trigger). 4. **`starter-smoke.yml`** — rename internal job id (`starter-smoke` → `smoke-starter`) and artifact name pattern (cosmetic; matches the new `test_<layer>-<target>` / `smoke-<layer>` naming convention; no external consumers). ### Fix skipped **`showcase_smoke-monitor.yml` slug normalization** (item #10 in the Notion page) — inspecting the file, it already uses the `showcase/packages/` slug convention (`ms-agent-python`, `ms-agent-dotnet`, `strands`). The apparent inconsistency is actually in `starter-smoke.yml`, whose matrix keys must stay as `ms-agent-framework-*` / `strands-python` because they are literal directory names in `examples/integrations/` (used as `working-directory: examples/integrations/${{ matrix.starter }}`). So there is no actionable change here — the two files use different slug conventions *by necessity*, because they target different directories (deployed `showcase/packages/*` vs. local `examples/integrations/*`). Flagging for the author of the blitz notes in case the actual concern was something else. Refs: [Bugs Found During Blitz](https://www.notion.so/3443aa381852812fb595c5118dd68818) items #3, #8, #9, #12.
65 lines
1.9 KiB
YAML
65 lines
1.9 KiB
YAML
name: test / doc-examples
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
paths: ["docs/**"]
|
|
push:
|
|
branches: [main]
|
|
paths: ["docs/**"]
|
|
|
|
# Least-privilege by default. Individual jobs/steps can widen when needed.
|
|
# id-token: write is required for Depot OIDC auth (runs-on: depot-ubuntu-*).
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
jobs:
|
|
validate-model-names:
|
|
runs-on: depot-ubuntu-24.04-4
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: pnpm/action-setup@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
- run: pnpm install --frozen-lockfile
|
|
- run: pnpm tsx scripts/validate-doc-model-names.ts
|
|
|
|
doc-tests:
|
|
runs-on: depot-ubuntu-24.04-4
|
|
timeout-minutes: 15
|
|
needs: validate-model-names
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: pnpm/action-setup@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- run: pnpm install --frozen-lockfile
|
|
- name: Install and start aimock
|
|
run: |
|
|
npm install -g @copilotkit/aimock@latest
|
|
AIMOCK_BIN=$(npm root -g)/../bin/aimock
|
|
echo "aimock binary: $AIMOCK_BIN"
|
|
ls -la "$AIMOCK_BIN" || echo "binary not found at expected path"
|
|
which aimock || echo "aimock not on PATH"
|
|
nohup node $(npm root -g)/@copilotkit/aimock/dist/cli.js --fixtures scripts/doc-tests/fixtures --validate-on-load > /tmp/aimock.log 2>&1 &
|
|
for i in $(seq 1 60); do
|
|
if curl -sf http://localhost:4010/health; then
|
|
echo "aimock ready"
|
|
exit 0
|
|
fi
|
|
sleep 1
|
|
done
|
|
echo "aimock failed to start. Logs:"
|
|
cat /tmp/aimock.log
|
|
exit 1
|
|
- run: pnpm tsx scripts/doc-tests/extract.ts
|
|
- run: pnpm tsx scripts/doc-tests/run.ts
|