Repository navigation
226 lines (218 loc) Β· 8.74 KB
/
Copy pathagent-cli.yml
File metadata and controls
226 lines (218 loc) Β· 8.74 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
# @ref llp/0002-testing-and-evals.plan.md
name: Expo Agent CLI
on:
workflow_dispatch: {}
push:
branches: [main]
paths:
- .github/workflows/agent-cli.yml
- packages/@expo/agent-cli/**
- bun.lock
- package.json
- bunfig.toml
pull_request:
paths:
- .github/workflows/agent-cli.yml
- packages/@expo/agent-cli/**
- bun.lock
- package.json
- bunfig.toml
schedule:
# Weekly, Monday 15:00 UTC β only the report-only tier 1 job runs on this trigger.
- cron: 0 15 * * 1
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
stack:
uses: ./.github/workflows/stack-gate.yml
# Tier 0 of LLP 0002: deterministic, model-free, runs on every PR.
tier0-linux:
needs: [stack]
if: needs.stack.outputs.run == 'true' && github.event_name != 'schedule'
runs-on: ubuntu-24.04
steps:
- name: π Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: π₯ Setup bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.14
- name: β¬’ Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- name: π¦ Install dependencies
run: bun install --ignore-scripts --frozen-lockfile
- name: π Build @expo/agent-cli
run: bun run build
working-directory: packages/@expo/agent-cli
- name: π Typecheck @expo/agent-cli
run: bun run typecheck
working-directory: packages/@expo/agent-cli
- name: π¨ Lint @expo/agent-cli
run: bun run lint
working-directory: packages/@expo/agent-cli
- name: π§ͺ Test @expo/agent-cli
run: bun run test
working-directory: packages/@expo/agent-cli
- name: π§ͺ Eval adapter tests
run: bun run test:eval-harness
working-directory: packages/@expo/agent-cli
- name: π― Tier 0 evals
run: bun evals/run.mjs --tier 0
working-directory: packages/@expo/agent-cli
# E2E is the long pole of tier 0 (~320s run as one step), so it is sharded across parallel
# jobs instead. A size-balanced sequencer (see e2e/vitest.config.ts) splits the 31 files so no
# shard gets both big ones; each builds its own ncc bundle because the suite spawns `bin/cli.js`.
# Both OSes run here β the win32 shards are what exercise the skills linker's directory-junction
# path (nothing else does).
tier0-e2e:
needs: [stack]
if: needs.stack.outputs.run == 'true' && github.event_name != 'schedule'
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022]
shard: [1, 2, 3]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: π Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: π₯ Setup bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.14
- name: β¬’ Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- name: π¦ Install dependencies
run: bun install --ignore-scripts --frozen-lockfile
- name: π Build @expo/agent-cli
run: bun run build
working-directory: packages/@expo/agent-cli
- name: π§ͺ E2E Test shard ${{ matrix.shard }}/3
run: bun run test:e2e -- --shard=${{ matrix.shard }}/3
working-directory: packages/@expo/agent-cli
# The iOS half of the installed-app check only runs where `hostPlatforms()` asks for iOS: macOS.
# The stub `xcrun` (simctl and devicectl) sits first on PATH, so no real simulator or phone
# is touched. Also run the macOS-only device-binding cases that Linux/Windows shards skip.
tier0-e2e-macos:
needs: [stack]
if: needs.stack.outputs.run == 'true' && github.event_name != 'schedule'
runs-on: macos-15
timeout-minutes: 20
steps:
- name: π Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: π₯ Setup bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.14
- name: β¬’ Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- name: π¦ Install dependencies
run: bun install --ignore-scripts --frozen-lockfile
- name: π Build @expo/agent-cli
run: bun run build
working-directory: packages/@expo/agent-cli
- name: π§ͺ E2E installed-app check on macOS
run: bun run test:e2e -- status-installed-test installed-readers-test
working-directory: packages/@expo/agent-cli
- name: π§ͺ E2E iOS device binding and Expo Go install
run: bun run test:e2e -- dev-test smoke-test -t "two worktrees, two simulators|binding the device to boot"
working-directory: packages/@expo/agent-cli
# Windows unit coverage: `resolveSpawnTarget` and the win32 branches of the path helpers.
# The win32 e2e run β including the skills linker's directory-junction path, which nothing
# else exercises β is sharded in `tier0-e2e` above.
tier0-windows:
needs: [stack]
if: needs.stack.outputs.run == 'true' && github.event_name != 'schedule'
runs-on: windows-2022
timeout-minutes: 45
steps:
- name: π Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: π₯ Setup bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.14
- name: β¬’ Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- name: π¦ Install dependencies
run: bun install --ignore-scripts --frozen-lockfile
- name: π Build @expo/agent-cli
run: bun run build
working-directory: packages/@expo/agent-cli
- name: π§ͺ Test @expo/agent-cli
run: bun run test
working-directory: packages/@expo/agent-cli
# Short real agent integration tests. Every relevant PR runs the entire Tier 1 suite.
# Advisory until repeated CI evidence establishes reliability; individual results stay visible.
tier1-agent-eval:
needs: [stack]
if: >-
needs.stack.outputs.run == 'true' &&
(github.event_name == 'pull_request' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'schedule' && github.repository == 'expo/expo-agent-cli'))
runs-on: ubuntu-24.04
permissions:
contents: read
continue-on-error: true
timeout-minutes: 30
env:
AGENT_CLI_EVAL_MODEL: qwen3:8b
AGENT_CLI_EVAL_MODEL_DIGEST: 500a1f067a9f782620b40bee6f7b0c89e17ae61f686b92c24933e4ca4b2b8b41
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.14
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- name: Install locked dependencies (including the real Expo fixture)
run: bun install --ignore-scripts --frozen-lockfile
- name: Build CLI
run: bun run --filter @expo/agent-cli build
- name: Install Ollama
run: curl -fsSL https://ollama.com/install.sh | sh
env:
OLLAMA_VERSION: 0.32.15
- name: Start Ollama and pull the model
run: |
ollama serve > "$RUNNER_TEMP/ollama.log" 2>&1 &
for _ in $(seq 1 30); do
curl -fsS http://127.0.0.1:11434/api/version && break
sleep 1
done
curl -fsS http://127.0.0.1:11434/api/version
ollama pull "$AGENT_CLI_EVAL_MODEL"
- name: Agent integration evals
id: evals
run: bun run test:evals
working-directory: packages/@expo/agent-cli
- name: Summarize eval evidence
if: always()
run: bun evals/summarize.ts
working-directory: packages/@expo/agent-cli
- name: Preserve eval evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: tier1-evidence-${{ github.run_id }}-${{ github.run_attempt }}
include-hidden-files: true
retention-days: 14
path: |
packages/@expo/agent-cli/evals/.artifacts/
${{ runner.temp }}/ollama.log