SIENTIAPDE-1318
Enhance CI workflow for comprehensive code quality checks - Added code formatting check, linting, type checking, and security analysis steps using Ruff, mypy, and Bandit. - Integrated pytest for running tests, ensuring a robust quality gate in the CI pipeline.
This commit is contained in:
29
.github/workflows/quality-gate.yml
vendored
29
.github/workflows/quality-gate.yml
vendored
@@ -66,10 +66,33 @@ jobs:
|
||||
run: |
|
||||
pip install -r ${{ steps.prepare-requirements.outputs.PROCESSED_REQUIREMENTS_FILE }}
|
||||
|
||||
- name: 🔍 Run Code Validation
|
||||
- name: 📝 Code Formatting Check (Ruff)
|
||||
run: |
|
||||
chmod +x validate.sh
|
||||
./validate.sh
|
||||
echo "Checking code formatting..."
|
||||
ruff format --check laborious/ tests/
|
||||
continue-on-error: false
|
||||
|
||||
- name: 🔎 Code Linting (Ruff)
|
||||
run: |
|
||||
echo "Running linting checks..."
|
||||
ruff check laborious/ tests/
|
||||
continue-on-error: false
|
||||
|
||||
- name: 🏷️ Type Checking (mypy)
|
||||
run: |
|
||||
echo "Running type checks..."
|
||||
mypy laborious/
|
||||
continue-on-error: true
|
||||
|
||||
- name: 🔒 Security Analysis (Bandit)
|
||||
run: |
|
||||
echo "Running security analysis..."
|
||||
bandit -r laborious/ -ll -q
|
||||
continue-on-error: true
|
||||
|
||||
- name: 🧪 Run Tests with Pytest
|
||||
run: |
|
||||
pytest tests --junitxml=pytest.xml --cov=laborious --cov-report=xml --cov-report=term
|
||||
|
||||
- name: Run SonarQube Analysis
|
||||
uses: SonarSource/sonarqube-scan-action@v5
|
||||
|
||||
Reference in New Issue
Block a user