-
Notifications
You must be signed in to change notification settings - Fork 7
240 lines (198 loc) · 7.19 KB
/
Copy pathintegration-tests.yml
File metadata and controls
240 lines (198 loc) · 7.19 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
name: Integration Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
server-integration:
name: Server protocol integration
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Install server dependencies
working-directory: server
run: bun install --frozen-lockfile
- name: Install integration-test dependencies
working-directory: integration-tests
run: bun install --frozen-lockfile
- name: Type-check integration tests
working-directory: integration-tests
run: bun run typecheck
- name: Run server integration tests
run: bun run test:integration:server
- name: Upload server integration diagnostics
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: server-integration-diagnostics
path: integration-tests/artifacts/server/
if-no-files-found: ignore
retention-days: 7
claude-live:
name: Live Claude conformance
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check for Anthropic testing key
id: anthropic-key
shell: bash
env:
ANTHROPIC_TESTING_KEY: ${{ secrets.ANTHROPIC_TESTING_KEY }}
run: |
if [ -n "$ANTHROPIC_TESTING_KEY" ]; then
echo "::add-mask::$ANTHROPIC_TESTING_KEY"
echo "available=true" >> "$GITHUB_OUTPUT"
else
echo "ANTHROPIC_TESTING_KEY is unavailable; skipping live Claude tests."
fi
- name: Check out repository
if: steps.anthropic-key.outputs.available == 'true'
uses: actions/checkout@v4
- name: Set up Bun
if: steps.anthropic-key.outputs.available == 'true'
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Install server dependencies
if: steps.anthropic-key.outputs.available == 'true'
working-directory: server
run: bun install --frozen-lockfile
- name: Install integration-test dependencies
if: steps.anthropic-key.outputs.available == 'true'
working-directory: integration-tests
run: bun install --frozen-lockfile
- name: Run live Claude conformance tests
if: steps.anthropic-key.outputs.available == 'true'
env:
ANTHROPIC_TESTING_KEY: ${{ secrets.ANTHROPIC_TESTING_KEY }}
run: bun run test:live:claude
- name: Upload live Claude diagnostics
if: failure() && steps.anthropic-key.outputs.available == 'true'
uses: actions/upload-artifact@v4
with:
name: claude-live-integration-diagnostics
path: integration-tests/artifacts/server/
if-no-files-found: ignore
retention-days: 7
codex-live:
name: Live Codex conformance
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check for OpenAI testing key
id: openai-key
shell: bash
env:
OPENAI_TESTING_KEY: ${{ secrets.OPENAI_TESTING_KEY }}
run: |
if [ -n "$OPENAI_TESTING_KEY" ]; then
echo "::add-mask::$OPENAI_TESTING_KEY"
echo "available=true" >> "$GITHUB_OUTPUT"
else
echo "OPENAI_TESTING_KEY is unavailable; skipping live Codex tests."
fi
- name: Check out repository
if: steps.openai-key.outputs.available == 'true'
uses: actions/checkout@v4
- name: Set up Bun
if: steps.openai-key.outputs.available == 'true'
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Install server dependencies
if: steps.openai-key.outputs.available == 'true'
working-directory: server
run: bun install --frozen-lockfile
- name: Install integration-test dependencies
if: steps.openai-key.outputs.available == 'true'
working-directory: integration-tests
run: bun install --frozen-lockfile
- name: Run live Codex conformance tests
if: steps.openai-key.outputs.available == 'true'
env:
OPENAI_TESTING_KEY: ${{ secrets.OPENAI_TESTING_KEY }}
run: bun run test:live:codex
- name: Upload live Codex diagnostics
if: failure() && steps.openai-key.outputs.available == 'true'
uses: actions/upload-artifact@v4
with:
name: codex-live-integration-diagnostics
path: integration-tests/artifacts/server/
if-no-files-found: ignore
retention-days: 7
lightpanda-e2e:
name: Lightpanda E2E
runs-on: ubuntu-latest
timeout-minutes: 15
env:
LIGHTPANDA_VERSION: 0.3.5
LIGHTPANDA_SHA256: 5713d49d06e8d4948d3358b6ce859ecca8e6f07dc312134d9f54999fb6e66c52
LIGHTPANDA_DISABLE_TELEMETRY: "true"
LIGHTPANDA_DISABLE_CORE_DUMP: "1"
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Install server dependencies
working-directory: server
run: bun install --frozen-lockfile
- name: Install web dependencies
working-directory: web
run: bun install --frozen-lockfile
- name: Install integration-test dependencies
working-directory: integration-tests
run: bun install --frozen-lockfile
- name: Compile Paraglide messages
working-directory: web
run: bun run i18n:compile
- name: Build SPA
run: bun run build
- name: Cache Lightpanda
uses: actions/cache@v4
with:
path: ~/.cache/garcon-lightpanda
key: lightpanda-linux-x86_64-${{ env.LIGHTPANDA_VERSION }}-${{ env.LIGHTPANDA_SHA256 }}
- name: Install pinned Lightpanda
shell: bash
run: |
LIGHTPANDA_DIR="$HOME/.cache/garcon-lightpanda/${LIGHTPANDA_VERSION}"
LIGHTPANDA_BIN="$LIGHTPANDA_DIR/lightpanda"
mkdir -p "$LIGHTPANDA_DIR"
if [ ! -f "$LIGHTPANDA_BIN" ]; then
curl --fail --location --retry 3 \
--output "$LIGHTPANDA_BIN" \
"https://github.com/lightpanda-io/browser/releases/download/${LIGHTPANDA_VERSION}/lightpanda-x86_64-linux"
fi
printf '%s %s\n' "$LIGHTPANDA_SHA256" "$LIGHTPANDA_BIN" | sha256sum --check
chmod a+x "$LIGHTPANDA_BIN"
"$LIGHTPANDA_BIN" version
echo "LIGHTPANDA_BIN=$LIGHTPANDA_BIN" >> "$GITHUB_ENV"
- name: Type-check integration tests
working-directory: integration-tests
run: bun run typecheck
- name: Run Lightpanda E2E tests
run: bun run test:integration:e2e
- name: Upload E2E diagnostics
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: lightpanda-e2e-diagnostics
path: integration-tests/artifacts/e2e/
if-no-files-found: ignore
retention-days: 7