Skip to content

feat(sdk): public client discovery, step-fetch, predicates, and testing module #553

feat(sdk): public client discovery, step-fetch, predicates, and testing module

feat(sdk): public client discovery, step-fetch, predicates, and testing module #553

Workflow file for this run

name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
jobs:
build:
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: clippy
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install Web UI dependencies
working-directory: web
run: npm ci
- name: Run Web UI tests
working-directory: web
run: npm test
- name: Build Web UI
working-directory: web
run: npm run build
- name: Build
run: cargo build --release
- name: Clippy
run: cargo clippy -- -D warnings
- name: Test
run: cargo test
- name: Test demo command
run: |
./target/release/rewind demo
./target/release/rewind sessions
./target/release/rewind show latest
site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install site dependencies
working-directory: site
run: npm ci
- name: Build site
working-directory: site
run: npm run build
version-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: CLI_VERSION matches Cargo.toml
run: |
cargo_version=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')
cli_version=$(grep '^CLI_VERSION' python/rewind_cli.py | sed 's/.*"\(.*\)"/\1/')
echo "Cargo.toml version: $cargo_version"
echo "CLI_VERSION: $cli_version"
if [ "$cargo_version" != "$cli_version" ]; then
echo "::error::CLI_VERSION in python/rewind_cli.py ($cli_version) does not match Cargo.toml ($cargo_version). Update CLI_VERSION and create a new GitHub Release."
exit 1
fi
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install and verify Python SDK
run: |
cd python
pip install -e .
python -c "import rewind_agent; print(f'rewind-agent v{rewind_agent.__version__}')"
python -c "from rewind_agent import step, node, tool, trace, annotate, wrap_langgraph, wrap_crew; print('All imports OK')"
- name: Lint
run: |
pip install ruff -q
cd python
ruff check .
- name: Run Python tests
run: |
cd python
pip install pytest -q
python -m pytest tests/ -v