Skip to content

Merge pull request #310 from Wolfvin/feat/issue-309-named-flow #364

Merge pull request #310 from Wolfvin/feat/issue-309-named-flow

Merge pull request #310 from Wolfvin/feat/issue-309-named-flow #364

name: CodeLens Quality Gate
on:
push:
branches: [main, develop, 'feature/**']
pull_request:
branches: [main]
jobs:
quality-gate:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
# tree-sitter pinned <0.26 (issue #235: 0.26 native segfault). Installing
# it makes `scan` use the fast tree-sitter path instead of the slow regex
# fallback that hung the old double-scan Initialize/Scan steps.
pip install "tree-sitter>=0.21.0,<0.26" pyyaml
pip install tree-sitter-python tree-sitter-javascript tree-sitter-html tree-sitter-css || true
pip install tree-sitter-typescript tree-sitter-rust || true
- name: Scan codebase
run: |
python3 scripts/codelens.py scan .
- name: Run quality gate
run: |
python3 scripts/codelens.py audit . --check dead-code,smell,complexity --severity high --format sarif > codelens-results.sarif
- name: Upload SARIF results
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: codelens-results.sarif
category: codelens
benchmark:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: quality-gate
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run benchmarks
run: |
cd benchmarks && python run_benchmarks.py --quick
- name: Check for regression
run: |
python3 benchmarks/check_regression.py --compare baseline
continue-on-error: true