|
| 1 | +name: test / integration |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + paths: |
| 7 | + - "packages/runtime/**" |
| 8 | + - ".github/workflows/test_runtime-servers.yml" |
| 9 | + pull_request: |
| 10 | + branches: [main] |
| 11 | + paths: |
| 12 | + - "packages/runtime/**" |
| 13 | + - ".github/workflows/test_runtime-servers.yml" |
| 14 | + workflow_dispatch: |
| 15 | + inputs: |
| 16 | + branch: |
| 17 | + description: "Branch to run the workflow on" |
| 18 | + required: true |
| 19 | + default: "main" |
| 20 | + type: string |
| 21 | + |
| 22 | +jobs: |
| 23 | + node: |
| 24 | + name: "runtime / node" |
| 25 | + runs-on: ubuntu-latest |
| 26 | + timeout-minutes: 15 |
| 27 | + steps: |
| 28 | + - name: Checkout |
| 29 | + uses: actions/checkout@v4 |
| 30 | + with: |
| 31 | + ref: ${{ github.event.inputs.branch || github.ref }} |
| 32 | + |
| 33 | + - name: Setup pnpm |
| 34 | + uses: pnpm/action-setup@v4 |
| 35 | + with: |
| 36 | + version: "10.13.1" |
| 37 | + |
| 38 | + - name: Use Node.js 22.x |
| 39 | + uses: actions/setup-node@v4 |
| 40 | + with: |
| 41 | + node-version: "22.x" |
| 42 | + |
| 43 | + - name: Install dependencies |
| 44 | + run: pnpm install --frozen-lockfile |
| 45 | + |
| 46 | + - name: Configure Nx Cloud environment |
| 47 | + run: | |
| 48 | + echo "NX_CI_EXECUTION_ID=${{ github.run_id }}-${{ github.run_attempt }}-integration-node" >> $GITHUB_ENV |
| 49 | + echo "NX_CLOUD_NO_TIMEOUTS=true" >> $GITHUB_ENV |
| 50 | + echo "NX_CLOUD_DISTRIBUTED_EXECUTION=false" >> $GITHUB_ENV |
| 51 | + echo "NX_NO_CLOUD=true" >> $GITHUB_ENV |
| 52 | +
|
| 53 | + - name: Build runtime |
| 54 | + run: pnpm nx run @copilotkit/runtime:build |
| 55 | + |
| 56 | + - name: Run Node.js server integration tests |
| 57 | + working-directory: packages/runtime |
| 58 | + run: pnpm exec vitest run src/v2/runtime/__tests__/integration/node-servers.integration.test.ts |
| 59 | + |
| 60 | + bun: |
| 61 | + name: "runtime / bun" |
| 62 | + runs-on: ubuntu-latest |
| 63 | + timeout-minutes: 15 |
| 64 | + steps: |
| 65 | + - name: Checkout |
| 66 | + uses: actions/checkout@v4 |
| 67 | + with: |
| 68 | + ref: ${{ github.event.inputs.branch || github.ref }} |
| 69 | + |
| 70 | + - name: Setup pnpm |
| 71 | + uses: pnpm/action-setup@v4 |
| 72 | + with: |
| 73 | + version: "10.13.1" |
| 74 | + |
| 75 | + - name: Use Node.js 22.x |
| 76 | + uses: actions/setup-node@v4 |
| 77 | + with: |
| 78 | + node-version: "22.x" |
| 79 | + |
| 80 | + - name: Setup Bun |
| 81 | + uses: oven-sh/setup-bun@v2 |
| 82 | + with: |
| 83 | + bun-version: latest |
| 84 | + |
| 85 | + - name: Install dependencies |
| 86 | + run: pnpm install --frozen-lockfile |
| 87 | + |
| 88 | + - name: Configure Nx Cloud environment |
| 89 | + run: | |
| 90 | + echo "NX_CI_EXECUTION_ID=${{ github.run_id }}-${{ github.run_attempt }}-integration-bun" >> $GITHUB_ENV |
| 91 | + echo "NX_CLOUD_NO_TIMEOUTS=true" >> $GITHUB_ENV |
| 92 | + echo "NX_CLOUD_DISTRIBUTED_EXECUTION=false" >> $GITHUB_ENV |
| 93 | + echo "NX_NO_CLOUD=true" >> $GITHUB_ENV |
| 94 | +
|
| 95 | + - name: Build runtime |
| 96 | + run: pnpm nx run @copilotkit/runtime:build |
| 97 | + |
| 98 | + - name: Run Bun server integration tests |
| 99 | + working-directory: packages/runtime |
| 100 | + run: bun test src/v2/runtime/__tests__/integration/bun/bun-servers.integration.test.ts |
0 commit comments