Merge main into the Rust port #100
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
| name: DOC-D Snippet Harness | |
| on: | |
| push: | |
| branches: ["main", "feat/ver-align-canonical-pin"] | |
| pull_request: | |
| branches: ["main"] | |
| permissions: | |
| contents: read | |
| env: | |
| RUST_VERSION: "1.98.0" | |
| BUN_VERSION: "1.3.14" | |
| jobs: | |
| snippet-harness: | |
| name: Fenced snippet compile + import resolution | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| - name: Install bun dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build TypeScript entrypoints | |
| run: | | |
| bun run packages/pi-tui-protocol/build.ts || true | |
| test -f packages/pi-tui-protocol/dist/index.d.ts || (echo "pi-tui-protocol dist missing" && exit 1) | |
| - name: Run snippet harness (both lanes) | |
| run: bun run verify:snippets | |
| - name: Run snippet harness tests | |
| run: bun test scripts/verification/snippet-harness.test.ts | |
| rust-doctests: | |
| name: cargo test --doc (all five crates) | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | |
| - name: cargo test --doc for all five crates | |
| run: | | |
| for crate in pi-ai pi-agent pi-ext pi-tui pi; do | |
| echo "::group::cargo test --doc -p $crate" | |
| cargo test --doc -p "$crate" | |
| echo "::endgroup::" | |
| done |