Merge pull request #2 from ritesh-1918/Ritesh #74
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: HELPDESK.AI Continuous Integration (CI) | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| # --- JOB 1: Frontend Build Verification --- | |
| frontend-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: Frontend/package-lock.json | |
| - name: Install Frontend Dependencies | |
| run: | | |
| cd Frontend | |
| npm install | |
| - name: Build Frontend (Production) | |
| run: | | |
| cd Frontend | |
| npm run build | |
| env: | |
| VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }} | |
| VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }} | |
| # --- JOB 2: Backend & AI Integrity Checks --- | |
| backend-logic: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| cache: "pip" | |
| - name: Install Backend Dependencies | |
| run: | | |
| cd backend | |
| pip install -r requirements.txt | |
| - name: Verify Model Loading (Classifier Service) | |
| # This checks if the distilbert models are correctly structured and loadable | |
| run: | | |
| python -c " | |
| import os, sys | |
| sys.path.append(os.getcwd()) | |
| from backend.services.classifier_service import ClassifierService | |
| try: | |
| # We expect this to fail in CI if no physical model is pushed, | |
| # but it confirms the logic and imports are solid. | |
| service = ClassifierService() | |
| print('Import logic for AI Classifier is solid.') | |
| except Exception as e: | |
| print(f'AI Logic Error: {e}') | |
| # Optional: exit 1 if you want to enforce model presence in Git | |
| " |