-
Notifications
You must be signed in to change notification settings - Fork 51
257 lines (220 loc) · 8.09 KB
/
Copy pathci.yml
File metadata and controls
257 lines (220 loc) · 8.09 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
name: Static checks
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: '24'
cache: npm
- name: Install system dependencies
run: |
sudo env DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get update
sudo env DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y \
libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev fd-find ripgrep
sudo ln -sf "$(which fdfind)" /usr/local/bin/fd
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Check
run: npm run check
- name: Build workspace package entries
run: npm run build
- name: Workflow summary
if: always()
shell: bash
run: |
{
echo "## Static checks"
echo "- Status: ${{ job.status }}"
} >> "$GITHUB_STEP_SUMMARY"
# The coding-agent vitest suite dominates CI wall time (748+ files; measured
# 1364s single-fork, ~60% per-file import cost). Sharding it across three
# runners divides that wall while each shard keeps the CI fork-pool settings
# from vitest.config.ts (forks pool, capped workers) that prevent the historical
# subprocess-suite pool hang.
test-coding-agent:
name: Test (coding-agent ${{ matrix.shard }}/3)
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: '24'
cache: npm
- name: Install system dependencies
run: |
sudo env DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get update
sudo env DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y \
libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev fd-find ripgrep
sudo ln -sf "$(which fdfind)" /usr/local/bin/fd
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build workspace package entries
run: npm run build
- name: Test shard
timeout-minutes: 25
run: npx vitest run --shard=${{ matrix.shard }}/3
working-directory: packages/coding-agent
- name: Workflow summary
if: always()
shell: bash
run: |
{
echo "## Test (coding-agent ${{ matrix.shard }}/3)"
echo "- Status: ${{ job.status }}"
} >> "$GITHUB_STEP_SUMMARY"
test-workspaces:
name: Test (workspaces + scripts)
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: '24'
cache: npm
- name: Install system dependencies
run: |
sudo env DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get update
sudo env DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y \
libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev fd-find ripgrep
sudo ln -sf "$(which fdfind)" /usr/local/bin/fd
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build workspace package entries
run: npm run build
- name: Script tests
run: npm run test:scripts
- name: Workspace tests (all but coding-agent)
timeout-minutes: 25
run: >
npm run test
--workspace packages/agent
--workspace packages/ai
--workspace packages/pty
--workspace packages/senpi-codemode
--workspace packages/server
--workspace packages/tui
--if-present
- name: Workflow summary
if: always()
shell: bash
run: |
{
echo "## Test (workspaces + scripts)"
echo "- Status: ${{ job.status }}"
} >> "$GITHUB_STEP_SUMMARY"
# Fan-in gate carrying the exact context name branch protection requires
# ("Check and test"). It succeeds only when every check/test job above passed,
# so the required-status contract is unchanged while the work runs in parallel.
check-and-test:
name: Check and test
needs: [check, test-coding-agent, test-workspaces]
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Verify all gates
shell: bash
run: |
results='${{ join(needs.*.result, ' ') }}'
echo "gate results: $results"
for r in $results; do
if [ "$r" != "success" ]; then
echo "::error::a required CI job finished with result '$r'"
exit 1
fi
done
- name: Workflow summary
if: always()
shell: bash
run: |
{
echo "## Check and test (fan-in)"
echo "- check: ${{ needs.check.result }}"
echo "- test-coding-agent: ${{ needs.test-coding-agent.result }}"
echo "- test-workspaces: ${{ needs.test-workspaces.result }}"
} >> "$GITHUB_STEP_SUMMARY"
terminal-cross-os:
name: Terminal tools (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: '24'
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
# The persistent-terminal TS runtime + tool suite must pass on all three OS. Native
# ConPTY/PTY behavior is proven separately by the Native Prebuilds cargo job; here the
# loader falls back to the child_process pipe backend when no host prebuild is present,
# so these tests exercise the cross-OS TS layer (loader, session, screen, tools).
- name: PTY package tests
run: npm run test --workspace @earendil-works/pi-pty
- name: Terminal extension + shell resolution tests
shell: bash
run: npx vitest run test/suite/terminal-extension.test.ts test/suite/terminal-settings-notify.test.ts test/suite/shell-config-kind.test.ts
working-directory: packages/coding-agent
inspector-handoff:
name: Inspector handoff (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: '24'
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build workspace package entries
run: npm run build
- name: Run Inspector handoff regression
run: npx vitest run test/suite/regressions/inspector-endpoint-handoff.test.ts
working-directory: packages/coding-agent
- name: Summarize Inspector handoff
if: always()
shell: bash
run: |
{
echo "## Inspector handoff"
echo "- OS: ${{ matrix.os }}"
echo "- Node: 24"
echo "- Test: inspector-endpoint-handoff.test.ts"
} >> "$GITHUB_STEP_SUMMARY"