fix(codesec): remove duplicate detect_stack() call #38
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 | |
| # Sprint 1 skeleton (T-1.1): lint + test scaffolding for both the Python | |
| # backend/agents and the React frontend. Kept intentionally lenient | |
| # (continue-on-error where noted) since most modules are still mocks - | |
| # the goal for Sprint 1 is a GREEN pipeline that runs, not 100% coverage. | |
| # Sprint 5 (T-5.6/T-5.7) will harden this (strict linting, real coverage | |
| # gates, no continue-on-error). | |
| on: | |
| push: | |
| branches: ["main", "master", "feature/**"] | |
| pull_request: | |
| branches: ["main", "master"] | |
| jobs: | |
| backend-lint-and-test: | |
| name: Backend (Python) - lint & test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pytest pytest-asyncio pytest-cov ruff mypy qdrant-client sentence-transformers google-generativeai | |
| - name: Lint (ruff) | |
| run: ruff check src/ || true | |
| continue-on-error: true # Sprint 1: not all modules exist yet | |
| - name: Type check (mypy) | |
| run: mypy src/ || true | |
| continue-on-error: true # Sprint 1: not all modules exist yet | |
| - name: Run tests (pytest) | |
| run: pytest --maxfail=1 --disable-warnings -q || true | |
| continue-on-error: true # Sprint 1: most agents are still mocks | |
| frontend-lint-and-build: | |
| name: Frontend (React) - lint & build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # BUGFIX v1.1: actions/setup-node's cache-dependency-path used to | |
| # point at src/frontend/package-lock.json unconditionally. Until | |
| # T-1.16 (Karim) creates src/frontend/, that file doesn't exist, | |
| # and setup-node's cache resolution step FAILS HARD at this point - | |
| # continue-on-error on the later steps (install/lint/build) never | |
| # even gets a chance to run, because Set up Node itself errors out. | |
| # Fix: check the folder exists first, and skip the rest of this | |
| # job's steps entirely (via `if:`) when it doesn't, instead of | |
| # relying on continue-on-error to catch a failure it can't reach. | |
| - name: Check if frontend exists | |
| id: check_frontend | |
| run: | | |
| if [ -f "src/frontend/package.json" ]; then | |
| echo "exists=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "exists=false" >> "$GITHUB_OUTPUT" | |
| echo "::warning::src/frontend/package.json not found yet (T-1.16 not done) - skipping frontend CI job" | |
| fi | |
| - name: Set up Node | |
| if: steps.check_frontend.outputs.exists == 'true' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: src/frontend/package-lock.json | |
| - name: Install dependencies | |
| if: steps.check_frontend.outputs.exists == 'true' | |
| working-directory: src/frontend | |
| run: npm ci || npm install | |
| continue-on-error: true | |
| - name: Lint (ESLint) | |
| if: steps.check_frontend.outputs.exists == 'true' | |
| working-directory: src/frontend | |
| run: npm run lint || true | |
| continue-on-error: true | |
| - name: Build | |
| if: steps.check_frontend.outputs.exists == 'true' | |
| working-directory: src/frontend | |
| run: npm run build || true | |
| continue-on-error: true |