Skip to content

fix: align chat agent e2e stream assertions #34

fix: align chat agent e2e stream assertions

fix: align chat agent e2e stream assertions #34

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
library:
name: Library — lint / test / build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx nx lint stream-resource
- run: npx nx test stream-resource --coverage
- run: npx nx build stream-resource --configuration=production
website:
name: Website — lint / build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx nx lint website
# nx build website triggers demo:build first (dependsOn in project.json)
- run: npx nx build website
cockpit:
name: Cockpit — build / test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx nx build cockpit --skip-nx-cache
- run: npx nx test cockpit --skip-nx-cache
cockpit-smoke:
name: Cockpit — representative capability smoke
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx nx run-many -t smoke --projects=cockpit-deep-agents-planning-python,cockpit-deep-agents-filesystem-python,cockpit-deep-agents-subagents-python,cockpit-deep-agents-memory-python,cockpit-deep-agents-skills-python,cockpit-deep-agents-sandboxes-python,cockpit-langgraph-persistence-python,cockpit-langgraph-durable-execution-python,cockpit-langgraph-streaming-python,cockpit-langgraph-interrupts-python,cockpit-langgraph-memory-python,cockpit-langgraph-subgraphs-python,cockpit-langgraph-time-travel-python,cockpit-langgraph-deployment-runtime-python --skip-nx-cache
cockpit-secret-integration:
name: Cockpit — secret-gated integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: |
if [ -z "${COCKPIT_SECRET_TOKEN}" ]; then
echo "Skipping secret-gated integration: COCKPIT_SECRET_TOKEN is not configured"
exit 0
fi
npx nx run cockpit-langgraph-deployment-runtime-python:integration --skip-nx-cache
env:
COCKPIT_SECRET_TOKEN: ${{ secrets.COCKPIT_SECRET_TOKEN }}
cockpit-deploy-smoke:
name: Cockpit — deploy smoke dry-run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx tsx apps/cockpit/scripts/deploy-smoke.ts --url https://cockpit.stream-resource.dev --dry-run
mcp:
name: MCP — build / smoke
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx nx test mcp --skip-nx-cache
chat-agent-smoke:
name: Chat Agent — smoke
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
python-version: '3.12'
- run: npm ci
- working-directory: examples/chat-agent
run: uv sync
- run: npx nx run chat-agent:smoke --skip-nx-cache
cockpit-e2e:
name: Cockpit — e2e
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npx nx e2e cockpit --skip-nx-cache
website-e2e:
name: Website — e2e
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npx nx e2e website --skip-nx-cache
deploy:
name: Deploy → Vercel
needs: [library, website, cockpit, cockpit-smoke, cockpit-secret-integration, cockpit-deploy-smoke, mcp, chat-agent-smoke, cockpit-e2e, website-e2e]
runs-on: ubuntu-latest
# Only deploy on pushes to main, not on pull requests
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
# Vercel re-runs the full build on its servers using vercel.json buildCommand.
# Required GitHub secrets (Settings → Secrets and variables → Actions):
# VERCEL_TOKEN — vercel.com/account/tokens
# VERCEL_ORG_ID — from .vercel/project.json after `vercel link`
# VERCEL_PROJECT_ID — website project id
# VERCEL_COCKPIT_PROJECT_ID — cockpit project id
- run: npm ci
- run: npx playwright install --with-deps chromium
- name: Deploy to Vercel (production)
id: deploy
run: |
url=$(npx vercel deploy --prod --yes --token=${{ secrets.VERCEL_TOKEN }} | tail -n 1)
echo "deployment_url=$url" >> "$GITHUB_OUTPUT"
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
- name: Verify deployed website
run: npx nx e2e website --skip-nx-cache
env:
BASE_URL: https://stream-resource.dev
- name: Deploy cockpit to Vercel (production)
id: deploy_cockpit
run: |
url=$(npx vercel deploy --prod --yes --local-config=vercel.cockpit.json --token=${{ secrets.VERCEL_TOKEN }} | tail -n 1)
echo "deployment_url=$url" >> "$GITHUB_OUTPUT"
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_COCKPIT_PROJECT_ID }}
- name: Verify deployed cockpit
run: |
npx tsx apps/cockpit/scripts/deploy-smoke.ts --url "${{ steps.deploy_cockpit.outputs.deployment_url }}" --retries 10 --retry-delay-ms 2000
npx tsx apps/cockpit/scripts/deploy-smoke.ts --url https://cockpit.stream-resource.dev --retries 20 --retry-delay-ms 5000