Skip to content

keep file structure for build dist directory with tsdown #4085

keep file structure for build dist directory with tsdown

keep file structure for build dist directory with tsdown #4085

Workflow file for this run

name: CI
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:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.10.0
run_install: false
- name: Get pnpm store directory
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
# Create necessary directories for postinstall scripts
- name: Prepare directories
run: |
mkdir -p agents-docs/.source
touch agents-docs/.source/index.ts
- name: Setup pnpm cache
uses: actions/cache@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
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: ${{ runner.os }}-turbo-
- name: Install dependencies
run: |
pnpm install --frozen-lockfile
# Ensure agents-manage-ui dependencies are properly installed
cd agents-manage-ui && pnpm install --frozen-lockfile && cd ..
env:
HUSKY: 0
# Clean database files before running tests
- name: Clean database files
run: |
echo "Cleaning up any existing database files..."
find . -name "*.db" -o -name "*.sqlite" | grep -v node_modules | xargs -r rm -f
# Run all CI checks in parallel with Turborepo
- name: Run CI checks
id: ci-check
run: |
# Run all checks in parallel using Turborepo's dependency graph
# This will build once and cache, then run lint, typecheck, and test in parallel
pnpm check
env:
TURBO_TELEMETRY_DISABLED: 1
TURBO_CACHE_DIR: .turbo
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
ENVIRONMENT: test
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY || 'sk-test-key-for-ci-testing' }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY || 'sk-ant-test-key-for-ci-testing' }}
NODE_OPTIONS: --max-old-space-size=4096
CI: true
HUSKY: 0
- name: Biome Format
run: pnpm format:check
- name: Knip Unused Exports/Types Check
run: pnpm knip
# Create summary report
- name: Create CI Summary
if: always()
run: |
echo "## CI Run Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ steps.ci-check.outcome }}" == "success" ]; then
echo "✅ **All CI checks passed successfully!**" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "All build, lint, typecheck, and test tasks completed without errors." >> $GITHUB_STEP_SUMMARY
else
echo "❌ **CI checks failed**" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "One or more checks failed. Review the logs above for details." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Run \`pnpm check\` locally to reproduce the CI checks." >> $GITHUB_STEP_SUMMARY
fi
create-agents-e2e:
runs-on: ubuntu-latest
name: Create Agents E2E Tests
services:
postgres:
image: postgres:18
env:
POSTGRES_DB: inkeep_agents
POSTGRES_USER: appuser
POSTGRES_PASSWORD: password
options: >-
--health-cmd "pg_isready -U appuser"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.10.0
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Prepare directories
run: |
mkdir -p agents-docs/.source
touch agents-docs/.source/index.ts
- name: Setup pnpm cache
uses: actions/cache@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
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-create-agents-e2e-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-create-agents-e2e-
- name: Install dependencies
run: pnpm install --frozen-lockfile
env:
HUSKY: 0
- name: Build create-agents
run: npx turbo build --filter='@inkeep/create-agents'
env:
TURBO_TELEMETRY_DISABLED: 1
TURBO_CACHE_DIR: .turbo
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
- name: Run create-agents E2E tests
run: pnpm test:e2e --filter @inkeep/create-agents