forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (71 loc) · 2.55 KB
/
Copy pathtest_integration-docs.yml
File metadata and controls
74 lines (71 loc) · 2.55 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
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.
permissions:
contents: read
jobs:
validate-model-names:
runs-on: depot-ubuntu-24.04-4
timeout-minutes: 15
permissions:
contents: read
# id-token: write is required for Depot OIDC auth (runs-on: depot-ubuntu-*).
id-token: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
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
permissions:
contents: read
# id-token: write is required for Depot OIDC auth (runs-on: depot-ubuntu-*).
id-token: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
cache: pnpm
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- run: pnpm install --frozen-lockfile
- name: Install and start aimock
run: |
npm install -g @copilotkit/aimock@1.24.1
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