-
Notifications
You must be signed in to change notification settings - Fork 218
131 lines (113 loc) · 3.99 KB
/
Copy pathci.yml
File metadata and controls
131 lines (113 loc) · 3.99 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: CI
on:
pull_request:
push:
branches: ["main"]
env:
# Disable incremental compilation to avoid PDB locking issues on Windows
CARGO_INCREMENTAL: 0
# Reduce debuginfo to speed up builds and reduce PDB size
CARGO_PROFILE_DEV_DEBUG: 1
# Windows specific: disable long path issues
CARGO_NET_GIT_FETCH_WITH_CLI: true
# Skip npm install in tests to avoid timeout
TERMINATOR_SKIP_NPM_INSTALL: 1
# Skip telemetry collector check to avoid CI timeouts
OTEL_SKIP_COLLECTOR_CHECK: true
# Reduce retry time for telemetry in CI
OTEL_RETRY_DURATION_MINS: 0
jobs:
test:
strategy:
matrix:
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: dtolnay/rust-toolchain@stable
# Clean target directory to avoid PDB conflicts
- name: Clean target directory
run: |
if (Test-Path target) { Remove-Item -Recurse -Force target }
shell: pwsh
- uses: Swatinem/rust-cache@v2
with:
key: windows-${{ hashFiles('**/Cargo.lock') }}
# Build with retries
- name: Build workspace
run: |
$attempts = 3
for ($i = 1; $i -le $attempts; $i++) {
Write-Host "Build attempt $i of $attempts"
cargo build --workspace --verbose
if ($LASTEXITCODE -eq 0) {
break
}
if ($i -lt $attempts) {
Write-Host "Build failed, retrying in 5 seconds..."
Start-Sleep -Seconds 5
# Clean PDB files that might be locked
Get-ChildItem -Path target -Include *.pdb -Recurse | Remove-Item -Force -ErrorAction SilentlyContinue
}
}
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
shell: pwsh
- name: Test with telemetry feature
run: |
cargo build -p terminator-mcp-agent --features telemetry
cargo test -p terminator-mcp-agent --features telemetry -- --test-threads=1
- name: Test with sentry feature
run: |
cargo build -p terminator-mcp-agent --features sentry
cargo test -p terminator-mcp-agent --features sentry -- --test-threads=1
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: |
cd packages/terminator-nodejs
bun install --ignore-scripts || true
shell: pwsh
- name: Build Node.js bindings
run: |
cd packages/terminator-nodejs
bun run build
shell: pwsh
- name: Run Node.js tests
run: |
cd packages/terminator-nodejs
bun test
shell: pwsh
# Install Chrome extension and run browser tests
- name: Install Chrome
run: |
choco install googlechrome -y --ignore-checksums
Start-Sleep -Seconds 5
# check chrome is installed
$chromePath = "C:\Program Files\Google\Chrome\Application\chrome.exe"
if (-not (Test-Path $chromePath)) {
Write-Error "Chrome is not installed"
}
shell: pwsh
- name: Install extension via terminator workflow
run: |
Write-Host "Running extension installation workflow..."
cargo run --bin terminator -- mcp run crates/terminator/browser-extension/install_chrome_extension_ui.yml
shell: pwsh
timeout-minutes: 5
continue-on-error: true
- name: Run TypeScript browser script bridge workflow
run: |
Write-Host "Running comprehensive TypeScript workflow to test browser script bridge..."
cargo run --bin terminator -- mcp run examples/browser_script_bridge_workflow --skip-type-check
shell: pwsh
timeout-minutes: 15
continue-on-error: true
- name: Run Rust tests
run: cargo test --workspace --verbose -- --test-threads=1