Skip to content

Merge pull request #33 from dbhurley/feat/ai-discoverability #197

Merge pull request #33 from dbhurley/feat/ai-discoverability

Merge pull request #33 from dbhurley/feat/ai-discoverability #197

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Format check
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --all-targets
- name: Test
run: cargo test
- name: Setup Node (for CDP smoke test)
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install smoke test deps
if: ${{ matrix.os == 'ubuntu-latest' }}
working-directory: smoke
run: npm install
- name: CDP smoke test (Puppeteer)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
cargo build --release
./target/release/plasmate serve --protocol cdp --host 127.0.0.1 --port 9222 2>/dev/null &
PID=$!
sleep 1
node smoke/puppeteer-smoke.mjs
kill $PID
- name: MCP smoke test
if: ${{ matrix.os == 'ubuntu-latest' }}
run: python3 smoke/mcp-smoke.py
- name: Throughput benchmark
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
python3 bench/local_server.py 8765 &
sleep 1
./target/release/plasmate throughput-bench 2>&1 | tee bench-results.txt
kill $(lsof -ti:8765) 2>/dev/null || true
# Extract sequential ms/page and fail if regression > 2x baseline
MS_PER_PAGE=$(grep "Sequential:" bench-results.txt | grep -oP '[\d.]+ms/page' | grep -oP '[\d.]+')
echo "Sequential throughput: ${MS_PER_PAGE}ms/page"
# Baseline: 0.5ms/page on cached local pages. Fail if > 5ms (10x margin for CI variability)
python3 -c "
ms = float('${MS_PER_PAGE}')
limit = 5.0
print(f' Result: {ms}ms/page (limit: {limit}ms)')
if ms > limit:
print(f' REGRESSION: {ms}ms exceeds {limit}ms limit')
exit(1)
print(' PASS')
"