Files
copilotkit__copilotkit/.github/workflows/e2e_examples.yml
Alem Tuzlak 9a6ee39d96 chore(runtime): update package config, CI workflows, and docs
- Add package.json exports for v2/{express,hono,node} subpaths
- Add elysia devDependency and tsdown entry points
- Exclude bun integration tests from vitest config
- Update CI workflows to include runtime-servers test job
- Add runtime-server-adapter docs page
- Add changeset for the fetch-based runtime feature
2026-04-03 18:41:27 +02:00

114 lines
3.1 KiB
YAML

name: test / e2e / examples
on:
push:
branches: [main]
paths:
- "examples/**"
- ".github/workflows/e2e_examples.yml"
- ".changeset"
pull_request:
branches: [main]
paths:
- "examples/**"
- ".github/workflows/e2e_examples.yml"
workflow_dispatch:
inputs:
branch:
description: "Branch to run the workflow on"
required: true
default: "main"
type: string
env:
NX_VERBOSE_LOGGING: true
NX_CI_EXECUTION_ID: ${{ github.head_ref }}-${{ github.sha }}-${{ github.run_attempt }}
NX_CI_EXECUTION_ENV: "E2E Examples"
jobs:
examples:
name: ${{ matrix.example }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
example:
- form-filling
- travel
- research-canvas
- chat-with-your-data
- state-machine
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
ref: ${{ github.event.inputs.branch || github.ref }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.13.1
- name: Resolve pnpm store path
id: pnpm-store
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Configure Nx Cloud environment
run: |
echo "NX_CI_EXECUTION_ID=${{ github.run_id }}-${{ github.run_attempt }}-e2e-examples-${{ matrix.example }}" >> $GITHUB_ENV
echo "NX_CLOUD_NO_TIMEOUTS=true" >> $GITHUB_ENV
echo "NX_CLOUD_DISTRIBUTED_EXECUTION=false" >> $GITHUB_ENV
echo "NX_NO_CLOUD=true" >> $GITHUB_ENV
- name: Build CopilotKit
id: build-cpk
run: pnpm build
- name: Install e2e dependencies
working-directory: examples/e2e
run: pnpm install --frozen-lockfile
- name: Install Playwright browsers
working-directory: examples/e2e
run: pnpm exec playwright install --with-deps chromium
- name: Run e2e tests
working-directory: examples/e2e
env:
EXAMPLE: ${{ matrix.example }}
CI: "true"
OPENAI_API_KEY: test
NEXT_PUBLIC_CPK_PUBLIC_API_KEY: ""
NEXT_PUBLIC_COPILOT_PUBLIC_API_KEY: ""
LANGSMITH_API_KEY: ""
run: pnpm test
- name: Upload Playwright artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: examples-e2e-${{ matrix.example }}
path: |
examples/e2e/test-results/**/*
examples/e2e/playwright-report/**/*
retention-days: 7