feat: Stage 2 Phase 1 - Meta-Learning Retention Tracking #881
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: Lint & Format Check | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint with Ruff | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: 'pip' | |
| - name: Install Ruff | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff | |
| - name: Run Ruff linter | |
| run: | | |
| ruff check . --output-format=github --exclude _graveyard | |
| continue-on-error: false | |
| - name: Check Ruff formatting | |
| run: | | |
| ruff format --check . --exclude _graveyard | |
| continue-on-error: false | |
| - name: Code Review Comments (Optional) | |
| if: github.event_name == 'pull_request' && env.ENABLE_CODE_REVIEW_COMMENTS == 'true' | |
| env: | |
| ENABLE_CODE_REVIEW_COMMENTS: ${{ vars.ENABLE_CODE_REVIEW_COMMENTS || 'false' }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| GITHUB_WORKSPACE: ${{ github.workspace }} | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| python -m backend.code_review.main | |
| continue-on-error: true | |
| type-check: | |
| name: Type Check (Optional) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| continue-on-error: true # Type checking is optional for now | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install mypy | |
| - name: Run MyPy (optional - won't fail CI) | |
| run: | | |
| mypy backend/ --ignore-missing-imports --no-error-summary || true | |
| continue-on-error: true | |