-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (73 loc) · 2.3 KB
/
integration-tests.yml
File metadata and controls
89 lines (73 loc) · 2.3 KB
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
name: Integration Tests
on:
workflow_dispatch:
inputs:
run_e2e:
description: 'Also run Tier 3 E2E tests (requires OPENAI_API_KEY secret)'
type: boolean
default: false
env:
CARGO_TERM_COLOR: always
jobs:
integration:
name: Tier 1+2 Integration Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry and build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
integration_tests/target
key: ${{ runner.os }}-integration-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-integration-
- name: Install protoc
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- 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@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry and build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
integration_tests/target
key: ${{ runner.os }}-integration-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-integration-
- name: Install protoc
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- 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