SIENTIAPDE-1318
Enhance validation script and CI workflow for code quality checks - Added support for a --fix option in validate.sh to apply Ruff auto-fixes for code formatting and linting. - Updated quality-gate.yml to include separate steps for installing development and runtime dependencies. - Introduced dedicated steps for code formatting checks, linting, type checking, and security analysis in the CI workflow.
This commit is contained in:
31
.github/workflows/quality-gate.yml
vendored
31
.github/workflows/quality-gate.yml
vendored
@@ -57,11 +57,38 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: 📦 Install Dependencies
|
||||
- name: 📦 Install Development Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements-dev.txt
|
||||
|
||||
- name: 📦 Install Runtime Dependencies
|
||||
run: |
|
||||
pip install -r ${{ steps.prepare-requirements.outputs.PROCESSED_REQUIREMENTS_FILE }}
|
||||
pip install pytest pytest-cov pytest-asyncio
|
||||
|
||||
- name: 📝 Code Formatting Check (Ruff)
|
||||
run: |
|
||||
echo "Checking code formatting..."
|
||||
ruff format --check scouter/ tests/
|
||||
continue-on-error: false
|
||||
|
||||
- name: 🔎 Code Linting (Ruff)
|
||||
run: |
|
||||
echo "Running linting checks..."
|
||||
ruff check scouter/ tests/
|
||||
continue-on-error: false
|
||||
|
||||
- name: 🏷️ Type Checking (mypy)
|
||||
run: |
|
||||
echo "Running type checks..."
|
||||
mypy scouter/
|
||||
continue-on-error: true
|
||||
|
||||
- name: 🔒 Security Analysis (Bandit)
|
||||
run: |
|
||||
echo "Running security analysis..."
|
||||
bandit -r scouter/ -ll -q
|
||||
continue-on-error: true
|
||||
|
||||
- name: 🧪 Run Tests with Pytest
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user