Skip to content

CI: terminate REPL SQL smoke test statement with semicolon #53

CI: terminate REPL SQL smoke test statement with semicolon

CI: terminate REPL SQL smoke test statement with semicolon #53

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
merge_group:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: "0"
CARGO_PROFILE_DEV_DEBUG: "0"
CARGO_PROFILE_TEST_DEBUG: "0"
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1"
RUST_TOOLCHAIN: nightly-2026-07-20
jobs:
rustpython-bridge:
name: RustPython bridge (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-2025
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Rust
shell: bash
run: |
rustup toolchain install "$RUST_TOOLCHAIN" \
--profile minimal \
--component clippy,rustfmt
rustup override set "$RUST_TOOLCHAIN"
- name: Restore Cargo cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
continue-on-error: true
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
${{ runner.temp }}/poly-python/target/
key: poly-python-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
poly-python-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}-
- name: Prepare isolated bridge crate
shell: pwsh
run: |
$target = Join-Path $env:RUNNER_TEMP "poly-python"
New-Item -ItemType Directory -Force -Path $target | Out-Null
Copy-Item src/poly_python/Cargo.toml $target
Copy-Item src/poly_python/src $target -Recurse
Copy-Item src/poly_python/tests $target -Recurse
Copy-Item Cargo.lock (Join-Path $target "Cargo.lock")
if (-not (Test-Path (Join-Path $target "Cargo.toml"))) {
throw "The isolated bridge crate was not copied correctly."
}
"POLY_PYTHON_CHECKOUT=$target" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Check formatting
if: runner.os == 'Linux'
shell: pwsh
run: cargo fmt --manifest-path "$env:POLY_PYTHON_CHECKOUT/Cargo.toml" -- --check
- name: Run Clippy
if: runner.os == 'Linux'
shell: pwsh
run: cargo clippy --manifest-path "$env:POLY_PYTHON_CHECKOUT/Cargo.toml" --all-targets -- -D warnings
- name: Run bridge tests
shell: pwsh
run: cargo test --manifest-path "$env:POLY_PYTHON_CHECKOUT/Cargo.toml"
bun-contract:
name: Poly direct-integration contract
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.3.2
- name: Bundle TypeScript SDK example
run: bun build poly/examples/main.ts --target bun --outdir .poly/sdk-check
- name: Enforce the no-subprocess runtime boundary
shell: bash
run: |
if git grep -En \
'Command::new|std::process::Command|Bun\.spawn|child_process|std::sync::mpsc' \
-- src/poly_python poly/sdk poly/examples; then
echo "The runtime boundary must stay in-process and same-thread." >&2
exit 1
fi
- name: Enforce direct fork integration
shell: bash
run: |
test -d src/poly_python
test -f poly/scripts/build.ps1
test ! -e patches/bun-in-process.patch
test ! -e scripts/bootstrap-bun.ps1
git grep -q 'poly_python = { path = "src/poly_python" }' Cargo.toml