Skip to content

Commit a519a99

Browse files
ZhiXiao-Linclaude
andauthored
ci: type-check Node and Python SDKs on PRs (#81)
The SDKs are excluded from the core workspace and were only compiled at release time (napi/maturin), so a core change that broke an SDK (e.g. PR #76 adding a field to AutoDelegationConfig that the Python SDK constructed with a struct literal) slipped through CI and only failed the v4.2.0 release wheel build. Add an 'SDK build check' job running 'cargo check' on both SDK manifests so such breakage fails on the PR instead. Co-authored-by: Claude <claude@anthropic.com>
1 parent 47347a4 commit a519a99

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,30 @@ jobs:
3737

3838
# - name: Tests
3939
# run: cargo test --workspace --lib
40+
41+
sdk-check:
42+
name: SDK build check
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v4
46+
47+
- name: Setup workspace context
48+
run: bash .github/setup-workspace.sh
49+
50+
- name: Install Rust
51+
uses: dtolnay/rust-toolchain@stable
52+
53+
- uses: Swatinem/rust-cache@v2
54+
55+
- name: Install protobuf compiler
56+
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
57+
58+
# The Node and Python SDKs are excluded from the core workspace and are
59+
# otherwise only compiled at release time (napi / maturin). Type-check them
60+
# here so a core change that breaks an SDK (e.g. a new struct field that an
61+
# SDK constructs with a literal) fails on the PR instead of the release.
62+
- name: Check Node SDK
63+
run: cargo check --manifest-path sdk/node/Cargo.toml
64+
65+
- name: Check Python SDK
66+
run: cargo check --manifest-path sdk/python/Cargo.toml

0 commit comments

Comments
 (0)