forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (61 loc) · 1.95 KB
/
Copy pathtest_integration-docs.yml
File metadata and controls
64 lines (61 loc) · 1.95 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
name: test / integration / docs
on:
pull_request:
branches: [main]
paths: ["docs/**"]
push:
branches: [main]
paths: ["docs/**"]
# Least-privilege by default. Individual jobs/steps can widen when needed.
# id-token: write is required for Depot OIDC auth (runs-on: depot-ubuntu-*).
permissions:
contents: read
id-token: write
jobs:
validate-model-names:
runs-on: depot-ubuntu-24.04-4
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm tsx scripts/validate-doc-model-names.ts
doc-tests:
runs-on: depot-ubuntu-24.04-4
timeout-minutes: 15
needs: validate-model-names
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pnpm install --frozen-lockfile
- name: Install and start aimock
run: |
npm install -g @copilotkit/aimock@latest
AIMOCK_BIN=$(npm root -g)/../bin/aimock
echo "aimock binary: $AIMOCK_BIN"
ls -la "$AIMOCK_BIN" || echo "binary not found at expected path"
which aimock || echo "aimock not on PATH"
nohup node $(npm root -g)/@copilotkit/aimock/dist/cli.js --fixtures scripts/doc-tests/fixtures --validate-on-load > /tmp/aimock.log 2>&1 &
for i in $(seq 1 60); do
if curl -sf http://localhost:4010/health; then
echo "aimock ready"
exit 0
fi
sleep 1
done
echo "aimock failed to start. Logs:"
cat /tmp/aimock.log
exit 1
- run: pnpm tsx scripts/doc-tests/extract.ts
- run: pnpm tsx scripts/doc-tests/run.ts