1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
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@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
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