Skip to content

fix: annotate multi-arch OCI manifest #24

fix: annotate multi-arch OCI manifest

fix: annotate multi-arch OCI manifest #24

Workflow file for this run

name: CI / 持续集成
on:
push:
pull_request:
permissions:
contents: read
jobs:
rust-and-python:
name: Rust + Python contract tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: Check formatting
run: cargo fmt --all -- --check
- name: Lint Rust
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Test Rust
run: cargo test --workspace -- --test-threads=2
- name: Compile Python sources
shell: bash
run: |
set -euo pipefail
while IFS= read -r -d '' file; do python -m py_compile "$file"; done < <(find python -name '*.py' -print0)
- name: Test Python adapters
run: PYTHONPATH=python python -m unittest discover -s python/tests -v
- name: Validate scenario schema
run: python -m json.tool schemas/scenario.schema.json >/dev/null
- name: Validate action metadata
run: ruby -e 'require "yaml"; YAML.load_file("action.yml")'
- name: Run passing reference scenarios
shell: bash
run: |
set -euo pipefail
cargo run --quiet -- run examples/reference-clean.yml --output .memoryproof/clean
cargo run --quiet -- run examples/isolation-reference.yml --output .memoryproof/isolation
- name: Verify a generated evidence bundle
shell: bash
run: |
set -euo pipefail
bundle=$(find .memoryproof/clean -mindepth 1 -maxdepth 1 -type d | head -1)
cargo run --quiet -- verify "$bundle"
- name: Check deliberate failures are detected
shell: bash
run: |
set +e
cargo run --quiet -- run examples/reference-leaky.yml --output .memoryproof/leaky
leaky=$?
cargo run --quiet -- run examples/reference-overdelete.yml --output .memoryproof/overdelete
overdelete=$?
set -e
test "$leaky" -eq 1
test "$overdelete" -eq 1
- name: Build public matrix
run: |
python scripts/build_matrix.py
python -m json.tool site/matrix.json >/dev/null
- name: Upload evidence bundles
if: always()
uses: actions/upload-artifact@v7
with:
name: memoryproof-evidence
path: .memoryproof/
if-no-files-found: ignore
cross-platform:
name: Cross-platform build (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --workspace --all-targets
- run: cargo test --workspace -- --test-threads=2
official-adapter-contracts:
name: Official adapter contracts (local mock)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: Start deterministic provider mocks and run all official adapters
shell: bash
run: |
set -euo pipefail
python -u scripts/mock_remote_backend.py --provider mem0 --port 8888 >/tmp/mem0.log 2>&1 & mem0=$!
python -u scripts/mock_remote_backend.py --provider letta --port 8283 >/tmp/letta.log 2>&1 & letta=$!
python -u scripts/mock_remote_backend.py --provider zep --port 8000 >/tmp/zep.log 2>&1 & zep=$!
trap 'kill "$mem0" "$letta" "$zep" 2>/dev/null || true' EXIT
sleep 1
NO_PROXY=localhost,127.0.0.1 no_proxy=localhost,127.0.0.1 \
cargo run --quiet -- run examples/mem0.yml --allow-network --output .memoryproof/mem0
NO_PROXY=localhost,127.0.0.1 no_proxy=localhost,127.0.0.1 \
cargo run --quiet -- run examples/letta.yml --allow-network --output .memoryproof/letta
NO_PROXY=localhost,127.0.0.1 no_proxy=localhost,127.0.0.1 \
cargo run --quiet -- run examples/zep.yml --allow-network --output .memoryproof/zep