macp-runtime 0.7.5

MACP reference runtime: a coordination kernel and gRPC server enforcing session boundaries, message validation, append-only history, modes, and governance policy.
Documentation
name: Integration Tests

# Manual dispatch for the full integration matrix. Tier 1 + 2 also run on
# every PR via the `integration` job in ci.yml; this workflow exists to run
# them on demand and to opt into Tier 3 (real OpenAI agents).
on:
  workflow_dispatch:
    inputs:
      run_e2e:
        description: 'Also run Tier 3 E2E tests (requires OPENAI_API_KEY secret)'
        type: boolean
        default: false

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always
  # Keep in sync with rust-toolchain.toml.
  RUST_TOOLCHAIN: "1.96.1"
  PROTOC_VERSION: "31.x"

jobs:
  integration:
    name: Tier 1+2 Integration Tests
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v7

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1
        with:
          toolchain: ${{ env.RUST_TOOLCHAIN }}

      - name: Cache cargo registry and build
        uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
        with:
          shared-key: integration
          workspaces: |
            .
            integration_tests

      - name: Install protoc
        uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
        with:
          version: ${{ env.PROTOC_VERSION }}
          repo-token: ${{ github.token }}

      - name: Build runtime binary
        run: cargo build

      - name: Run Tier 1+2 integration tests
        working-directory: integration_tests
        env:
          MACP_TEST_BINARY: ../target/debug/macp-runtime
        run: cargo test -- --test-threads=1
        timeout-minutes: 10

  e2e:
    name: Tier 3 E2E Tests
    runs-on: ubuntu-latest
    if: github.event.inputs.run_e2e == 'true'

    steps:
      - name: Checkout repository
        uses: actions/checkout@v7

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1
        with:
          toolchain: ${{ env.RUST_TOOLCHAIN }}

      - name: Cache cargo registry and build
        uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
        with:
          shared-key: integration
          workspaces: |
            .
            integration_tests

      - name: Install protoc
        uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
        with:
          version: ${{ env.PROTOC_VERSION }}
          repo-token: ${{ github.token }}

      - name: Build runtime binary
        run: cargo build

      - name: Run Tier 3 E2E tests
        working-directory: integration_tests
        env:
          MACP_TEST_BINARY: ../target/debug/macp-runtime
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
        run: cargo test -- --ignored --test-threads=1
        timeout-minutes: 10