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