Feat/dynamic tool routing #4283
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [release] | |
| pull_request: | |
| branches: [release] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PNPM | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.15.1 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "pnpm" | |
| - name: Install ffmpeg | |
| uses: AnimMouse/setup-ffmpeg@v1 | |
| with: | |
| # Pin to a known-good release. The default (latest → FFmpeg 8.1) | |
| # BtbN/FFmpeg-Builds Linux asset is currently corrupt and fails the | |
| # job at download ("xz: File format not recognized"). Revert once | |
| # upstream republishes a valid 8.1 build. | |
| version: "7.1" | |
| - name: Verify ffmpeg installation | |
| run: | | |
| echo "🎬 Verifying ffmpeg installation..." | |
| ffmpeg -version || { | |
| echo "❌ ffmpeg installation failed!" | |
| echo "Please check the setup-ffmpeg action configuration." | |
| exit 1 | |
| } | |
| echo "✅ ffmpeg installed successfully" | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: 🔄 SvelteKit Sync | |
| run: | | |
| echo "🔄 Running SvelteKit sync to generate TypeScript configs..." | |
| pnpm exec svelte-kit sync | |
| - name: Check code formatting | |
| run: | | |
| echo "🎨 Checking code formatting..." | |
| pnpm run format:check || { | |
| echo "❌ Formatting issues found!" | |
| echo "Run 'pnpm run format' locally to fix." | |
| exit 1 | |
| } | |
| - name: Run linting | |
| run: | | |
| echo "🔍 Running ESLint validation with controlled warning limits..." | |
| npx eslint src/ --max-warnings=300 | |
| npx eslint test/continuous-test-suite*.ts test/zod-schema-test-function.ts --max-warnings=10 | |
| - name: 🔒 Security & Environment Validation | |
| run: | | |
| echo "🔍 Running build rule enforcement validations..." | |
| pnpm run validate:all | |
| - name: Build package | |
| run: pnpm run build | |
| - name: Test CLI build | |
| run: | | |
| pnpm run build:cli | |
| node dist/cli/index.js --help | |
| # action-smoke-test: | |
| # name: GitHub Action Smoke Test | |
| # runs-on: ubuntu-latest | |
| # needs: [test] | |
| # steps: | |
| # - name: Checkout code | |
| # uses: actions/checkout@v4 | |
| # - name: Setup PNPM | |
| # uses: pnpm/action-setup@v4 | |
| # with: | |
| # version: 9 | |
| # - name: Setup Node.js | |
| # uses: actions/setup-node@v4 | |
| # with: | |
| # node-version: "20" | |
| # cache: "pnpm" | |
| # - name: Install dependencies | |
| # run: pnpm install | |
| # - name: SvelteKit Sync | |
| # run: pnpm exec svelte-kit sync | |
| # - name: Build GitHub Action | |
| # run: pnpm run build:action | |
| # - name: Test NeuroLink Action | |
| # id: neurolink | |
| # uses: ./ | |
| # with: | |
| # prompt: "Respond with exactly: Hello from smoke test" | |
| # provider: google-ai | |
| # google_ai_api_key: ${{ secrets.GOOGLE_AI_API_KEY }} | |
| # max_tokens: "20" | |
| # temperature: "0" | |
| # debug: "true" | |
| # - name: Verify response | |
| # env: | |
| # RESPONSE: ${{ steps.neurolink.outputs.response }} | |
| # PROVIDER: ${{ steps.neurolink.outputs.provider }} | |
| # run: | | |
| # echo "Response: $RESPONSE" | |
| # echo "Provider: $PROVIDER" | |
| # if [ -z "$RESPONSE" ]; then | |
| # echo "ERROR: No response received" | |
| # exit 1 | |
| # fi | |
| # if [ -z "$PROVIDER" ]; then | |
| # echo "ERROR: Provider not reported" | |
| # exit 1 | |
| # fi | |
| # echo "✅ Action smoke test passed!" | |
| build-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PNPM | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.15.1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| - name: Install ffmpeg | |
| uses: AnimMouse/setup-ffmpeg@v1 | |
| with: | |
| # Pin to a known-good release. The default (latest → FFmpeg 8.1) | |
| # BtbN/FFmpeg-Builds Linux asset is currently corrupt and fails the | |
| # job at download ("xz: File format not recognized"). Revert once | |
| # upstream republishes a valid 8.1 build. | |
| version: "7.1" | |
| - name: Verify ffmpeg installation | |
| run: | | |
| echo "🎬 Verifying ffmpeg installation..." | |
| ffmpeg -version || { | |
| echo "❌ ffmpeg installation failed!" | |
| echo "Please check the setup-ffmpeg action configuration." | |
| exit 1 | |
| } | |
| echo "✅ ffmpeg installed successfully" | |
| - name: Install dependencies | |
| run: pnpm i | |
| - name: 🔄 SvelteKit Sync | |
| run: | | |
| echo "🔄 Running SvelteKit sync to generate TypeScript configs..." | |
| pnpm exec svelte-kit sync | |
| - name: Check package build | |
| run: pnpm run prepack | |
| - name: Verify package contents | |
| run: | | |
| pnpm pack | |
| ls -la dist/ | |
| quality-gate: | |
| runs-on: ubuntu-latest | |
| name: 🛡️ Code Quality & Security Gate | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PNPM | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.15.1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| - name: Install ffmpeg | |
| uses: AnimMouse/setup-ffmpeg@v1 | |
| with: | |
| # Pin to a known-good release. The default (latest → FFmpeg 8.1) | |
| # BtbN/FFmpeg-Builds Linux asset is currently corrupt and fails the | |
| # job at download ("xz: File format not recognized"). Revert once | |
| # upstream republishes a valid 8.1 build. | |
| version: "7.1" | |
| - name: Verify ffmpeg installation | |
| run: | | |
| echo "🎬 Verifying ffmpeg installation..." | |
| ffmpeg -version || { | |
| echo "❌ ffmpeg installation failed!" | |
| echo "Please check the setup-ffmpeg action configuration." | |
| exit 1 | |
| } | |
| echo "✅ ffmpeg installed successfully" | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: 🔄 SvelteKit Sync | |
| run: | | |
| echo "🔄 Running SvelteKit sync to generate TypeScript configs..." | |
| pnpm exec svelte-kit sync | |
| - name: 🔍 Build Validation | |
| run: | | |
| echo "🔍 Running comprehensive build validation..." | |
| pnpm run validate | |
| - name: 📝 Commit Message Validation | |
| run: | | |
| echo "📝 Validating commit message format..." | |
| # Get the commit message for validation and pass it to the validator | |
| COMMIT_MSG=$(git log -1 --pretty=format:"%s") | |
| echo "Validating: $COMMIT_MSG" | |
| pnpm exec tsx scripts/commit-validation.ts "$COMMIT_MSG" | |
| - name: 🌍 Environment Validation | |
| run: | | |
| echo "🌍 Validating environment configuration..." | |
| pnpm run validate:env | |
| - name: 🔒 Security Validation | |
| run: | | |
| echo "🔒 Running security checks..." | |
| pnpm run validate:security | |
| - name: 📊 ESLint Quality Report | |
| run: | | |
| echo "📊 Generating ESLint quality report..." | |
| npx eslint src/ --format=json --output-file=eslint-report.json || true | |
| npx eslint src/ --format=stylish | |
| continue-on-error: true | |
| - name: 📈 TypeScript Compiler Check | |
| run: | | |
| echo "📈 Running TypeScript compiler strict checks on source files..." | |
| npx tsc --noEmit --strict --project tsconfig.json | |
| - name: 🎯 Test Suite Validation | |
| run: | | |
| echo "🎯 Continuous test suites are run separately with API keys" | |
| echo "Skipping automated test execution in CI" | |
| continue-on-error: true | |
| - name: 📋 Quality Summary | |
| run: | | |
| echo "📋 Build Rule Enforcement Summary:" | |
| echo "✅ Build validation passed" | |
| echo "✅ Environment validation passed" | |
| echo "✅ Security validation passed" | |
| echo "✅ TypeScript compilation passed" | |
| echo "✅ Commit message format validated" | |
| echo "" | |
| echo "🔒 Single Commit Policy:" | |
| echo "ℹ️ This workflow validates code quality for individual commits" | |
| echo "ℹ️ Single commit enforcement runs separately via PR validation" | |
| echo "ℹ️ See: Single Commit Per Branch Enforcement workflow" | |
| echo "" | |
| echo "🎉 All quality gates passed!" | |
| semantic-release-validation: | |
| runs-on: ubuntu-latest | |
| needs: [test, build-check] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup PNPM | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.15.1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Validate semantic-release configuration | |
| run: | | |
| npx semantic-release --dry-run \ | |
| --plugins "@semantic-release/commit-analyzer" \ | |
| --plugins "@semantic-release/release-notes-generator" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |