name: Code Quality

# This workflow is called by the main CI workflow
# No direct triggers - only invoked by ci.yml
on:
  workflow_call:

jobs:
  quality:
    runs-on: ubuntu-latest
    
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '22'
          cache: 'npm'
      
      - name: Install dependencies
        run: npm ci
      
      - name: Validate version consistency
        run: npm test -- tests/utils/version-validation.test.ts
      
      - name: Run ESLint
        run: npm run lint
      
      - name: Check code formatting
        run: npm run format:check
      
      - name: Type check
        run: npm run type-check

