fix(lint): resolve 9 ESLint errors across 8 files #463
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/CD Pipeline | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18.x' | |
| # Disable cache to avoid workspace conflicts | |
| # cache: 'npm' | |
| - name: Install dependencies | |
| run: | | |
| echo "Installing all dependencies including workspaces..." | |
| # Delete package-lock.json and node_modules to avoid workspace conflicts | |
| rm -f package-lock.json | |
| rm -rf node_modules | |
| # Use npm install with workspace support | |
| npm install --workspaces --include-workspace-root | |
| echo "Verifying core package dependencies..." | |
| cd packages/core | |
| npm list axios || echo "axios not found" | |
| npm list @kubernetes/client-node || echo "@kubernetes/client-node not found" | |
| cd ../.. | |
| - name: Create .env file | |
| run: | | |
| cat > .env << EOF | |
| # Supabase Configuration | |
| SUPABASE_URL=${{ secrets.SUPABASE_URL }} | |
| SUPABASE_SERVICE_ROLE_KEY=${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | |
| PUBLIC_SUPABASE_ANON_KEY=${{ secrets.PUBLIC_SUPABASE_ANON_KEY }} | |
| # Git Provider API Keys | |
| GITHUB_TOKEN=${{ secrets.GH_TOKEN }} | |
| GITHUB_CLIENT_SECRET=${{ secrets.GITHUB_CLIENT_SECRET }} | |
| GITHUB_CLIENT_ID=${{ secrets.GITHUB_CLIENT_ID }} | |
| GITLAB_TOKEN=${{ secrets.GITLAB_TOKEN }} | |
| # Agent API Keys | |
| ANTHROPIC_API_KEY=${{ secrets.ANTHROPIC_API_KEY }} | |
| OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} | |
| DEEPSEEK_API_KEY=${{ secrets.DEEPSEEK_API_KEY }} | |
| GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }} | |
| # New API Keys for DeepWiki and Embeddings | |
| OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }} | |
| GOOGLE_API_KEY=${{ secrets.GOOGLE_API_KEY }} | |
| VOYAGE_API_KEY=${{ secrets.VOYAGE_API_KEY }} | |
| # Environment | |
| NODE_ENV=test | |
| EOF | |
| - name: Lint | |
| run: npm run lint --no-workspaces | |
| - name: Build core package first | |
| run: | | |
| echo "Building core package first to ensure proper type exports..." | |
| cd packages/core | |
| echo "Installing core package dependencies explicitly..." | |
| npm install | |
| npm run build || (echo "Core build failed" && exit 1) | |
| echo "Verifying core build output..." | |
| ls -la dist/ | |
| ls -la dist/utils/ || echo "No utils directory" | |
| ls -la dist/types/ || echo "No types directory" | |
| ls -la dist/config/ || echo "No config directory" | |
| cd ../.. | |
| - name: Build all other packages sequentially | |
| run: | | |
| echo "Building remaining packages with core already built..." | |
| npx turbo run build --filter='@codequal/database' && echo "✅ Database build completed" || (echo "❌ Database build failed" && exit 1) | |
| npx turbo run build --filter='@codequal/agents' && echo "✅ Agents build completed" || (echo "❌ Agents build failed" && exit 1) | |
| - name: Test | |
| run: npm run test --no-workspaces |