ci(sdk): install TS SDK node deps before SDK Integration Tests#8702
Closed
scarmani wants to merge 1 commit into
Closed
ci(sdk): install TS SDK node deps before SDK Integration Tests#8702scarmani wants to merge 1 commit into
scarmani wants to merge 1 commit into
Conversation
The `sdk-integration` job runs `pytest tests/sdk/`, which includes
`test_typescript_exports.py::TestTypeScriptCompilation::test_sdk_compiles_cleanly`.
That test shells out to `npx tsc --noEmit` in `sdk/typescript`, but the job
never set up Node or ran `npm ci`. With no `node_modules`, npx resolved an
unpinned `tsc` and `@types/node` was absent, producing TS2688
("Cannot find type definition file for 'node'") / TS5103.
Add `actions/setup-node` + `npm ci` (mirroring the `typescript-sdk-run` job)
so the compile test gets the pinned TypeScript and `@types/node`. Verified
locally: the test fails without `node_modules` and passes after `npm ci`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
Author
|
Closing for queue drain as a duplicate/superseded workflow fix. The functional SDK integration change here (adding setup-node + npm ci for sdk/typescript before the SDK integration pytest step) is already carried in PR #8691, which remains open as the active required-context repair path. Branch preserved: claude/competent-cannon-063bad at 9adf200; this close is reversible if #8691 is abandoned. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The SDK Integration Tests CI job (
sdk-integrationin.github/workflows/sdk-test.yml) was failing on:with:
This is a pre-existing toolchain gap, not a product bug. It surfaced on #8701 but is unrelated to that PR's 2-line version change.
Root cause
test_sdk_compiles_cleanlyshells out tonpx tsc --noEmitinsidesdk/typescript. Thesdk-integrationjob sets up Python only — it never ranactions/setup-nodeornpm ci. With nonode_modules:npxresolved an unpinnedtscinstead of the repo-pinnedtypescript@^6.0.3, and@types/node(already a devDependency at^26.0.0) was absent, so the/// <reference types="node" />andnode:stream/webimport insrc/typecheck/node26-consumer.tscould not resolve → TS2688 / TS5103.The sibling
typescript-sdk-runjob already doessetup-node+npm ci; the integration job that actually runs the pytest compile check did not.Fix
Add
actions/setup-node@v4+npm ci(scoped tosdk/typescript) to thesdk-integrationjob, before the pytest step.tsconfig.jsonneeds no change — with@types/nodepresent innode_modules, the triple-slash node reference resolves via the default@typesauto-include.Verification
Reproduced locally via the exact failing path:
node_modulesabsent):test_sdk_compiles_cleanlyfails (unpinned tsc → TS5103 / TS2688).npm ciinsdk/typescript):1 passed.🤖 Generated with Claude Code