@@ -186,6 +186,26 @@ jobs:
186186 - run : uv pip install --reinstall dist/*.whl
187187 - run : uv run pytest tests/ -m slow -v
188188
189+ # * Rust unit tests — src/ir.rs 의 #[cfg(test)] 모듈 실행
190+ # Cargo.toml 의 default features 에서 extension-module 이 빠져 있어 libpython 링크 시도 안 함.
191+ # utf16_to_cp / simple_eq_text_alt / field_type_to_str / caption_direction_to_str /
192+ # assert_position_invariant (#[should_panic]) 검증 — Python 측에서 우회 불가능한 Rust 도메인 로직.
193+ cargo-test :
194+ name : Cargo test (Rust unit tests)
195+ needs : changes
196+ if : needs.changes.outputs.code == 'true'
197+ runs-on : ubuntu-latest
198+ steps :
199+ - uses : actions/checkout@v6
200+ with :
201+ submodules : recursive
202+ - uses : dtolnay/rust-toolchain@stable
203+ - uses : Swatinem/rust-cache@v2
204+ with :
205+ save-if : ${{ github.ref == 'refs/heads/main' }}
206+ - name : Run cargo test (default features — extension-module disabled)
207+ run : cargo test --lib
208+
189209 # * extras 미설치 시 langchain 테스트가 importorskip 로 auto-skip 되는지 검증
190210 test-core-only :
191211 name : Test without extras (importorskip auto-skip)
@@ -227,9 +247,9 @@ jobs:
227247 name : All tests passed
228248 if : always()
229249 runs-on : ubuntu-latest
230- needs : [changes, build-linux-wheel, test, test-other-os, test-slow, test-core-only]
250+ needs : [changes, build-linux-wheel, test, test-other-os, test-slow, test-core-only, cargo-test ]
231251 steps :
232252 - uses : re-actors/alls-green@release/v1
233253 with :
234254 jobs : ${{ toJSON(needs) }}
235- allowed-skips : build-linux-wheel, test, test-other-os, test-slow, test-core-only
255+ allowed-skips : build-linux-wheel, test, test-other-os, test-slow, test-core-only, cargo-test
0 commit comments