Skip to content

feat(run): enable inline text document attachments via chat APIs #8081

feat(run): enable inline text document attachments via chat APIs

feat(run): enable inline text document attachments via chat APIs #8081

Workflow file for this run

name: Cypress
on:
push:
branches:
- main
- master
pull_request:
branches: ["*"]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
cypress-e2e:
if: ${{ github.event_name != 'push' || github.actor != 'github-merge-queue[bot]' }}
name: Cypress E2E Tests
runs-on: ubuntu-32gb
timeout-minutes: 30
services:
doltgres:
image: dolthub/doltgresql:0.55.4
env:
DOLTGRES_USER: appuser
DOLTGRES_PASSWORD: password
DOLTGRES_DB: inkeep_agents
DOLTGRES_DATA_DIR: /var/lib/doltgres
ports:
- 5432:5432
options: >-
--health-cmd "PGPASSWORD=password psql -h localhost -U appuser -d inkeep_agents -c 'SELECT count(*) FROM dolt_status' || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 10
--health-start-period 30s
postgres:
image: postgres:18
env:
POSTGRES_DB: inkeep_agents
POSTGRES_USER: appuser
POSTGRES_PASSWORD: password
options: >-
--health-cmd "pg_isready -U appuser -d inkeep_agents"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5433:5432
steps:
- name: Check if changeset PR
id: changeset-check
run: |
if [ "$HEAD_REF" = "changeset-release/main" ]; then
echo "is_changeset=true" >> $GITHUB_OUTPUT
echo "Changeset PR detected — skipping Cypress tests"
else
echo "is_changeset=false" >> $GITHUB_OUTPUT
fi
env:
HEAD_REF: ${{ github.head_ref }}
- name: Checkout code
if: steps.changeset-check.outputs.is_changeset != 'true'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup Node.js
if: steps.changeset-check.outputs.is_changeset != 'true'
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22.x
- name: Setup pnpm
if: steps.changeset-check.outputs.is_changeset != 'true'
uses: pnpm/action-setup@c5ba7f7862a0f64c1b1a05fbac13e0b8e86ba08c # v4
with:
version: 10.10.0
run_install: false
- name: Get pnpm store directory
if: steps.changeset-check.outputs.is_changeset != 'true'
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
# Create necessary directories for postinstall scripts
- name: Prepare directories
if: steps.changeset-check.outputs.is_changeset != 'true'
run: |
mkdir -p agents-docs/.source
touch agents-docs/.source/index.ts
- name: Setup pnpm cache
if: steps.changeset-check.outputs.is_changeset != 'true'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-
- name: Setup Turborepo cache
if: steps.changeset-check.outputs.is_changeset != 'true'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: ${{ runner.os }}-turbo-
- name: Install dependencies
if: steps.changeset-check.outputs.is_changeset != 'true'
run: pnpm install --frozen-lockfile
env:
HUSKY: 0
# Clean database files before running tests
- name: Clean database files
if: steps.changeset-check.outputs.is_changeset != 'true'
run: |
echo "Cleaning up any existing database files..."
find . -name "*.db" -o -name "*.sqlite" | grep -v node_modules | xargs -r rm -f
# Start SpiceDB (needs explicit `serve` subcommand, so can't use service container)
- name: Start SpiceDB
if: steps.changeset-check.outputs.is_changeset != 'true'
run: |
docker run -d --name spicedb \
--network host \
-e SPICEDB_GRPC_PRESHARED_KEY=dev-secret-key \
-e SPICEDB_DATASTORE_ENGINE=memory \
-e SPICEDB_HTTP_ENABLED=true \
authzed/spicedb serve
echo "Waiting for SpiceDB to be ready..."
for i in $(seq 1 30); do
if nc -z 127.0.0.1 50051 2>/dev/null; then
echo "SpiceDB is ready!"
break
fi
echo " Attempt $i/30..."
sleep 1
done
# Run Cypress E2E tests using composite action
- name: Run Cypress E2E Tests
if: steps.changeset-check.outputs.is_changeset != 'true'
uses: ./.github/composite-actions/cypress-e2e
env:
NODE_OPTIONS: --max-old-space-size=8192
TURBO_TELEMETRY_DISABLED: 1
TURBO_CACHE_DIR: .turbo
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
# Infrastructure config matching GitHub Actions service containers.
# These are NOT secrets — they're identical to .env.example defaults.
# Needed here because the Next.js build step must NOT see runtime
# secrets from $GITHUB_ENV, so only these + ENVIRONMENT are set at
# the calling step level. Auth credentials (BETTER_AUTH_SECRET,
# password, bypass secret) are generated by setup-dev and exported
# selectively to $GITHUB_ENV for runtime steps only.
ENVIRONMENT: test
INKEEP_AGENTS_MANAGE_DATABASE_URL: postgresql://appuser:password@localhost:5432/inkeep_agents
INKEEP_AGENTS_RUN_DATABASE_URL: postgresql://appuser:password@localhost:5433/inkeep_agents
SPICEDB_PRESHARED_KEY: dev-secret-key
OTEL_SDK_DISABLED: true
CYPRESS_NO_COMMAND_LOG: 1
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}