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:
vitor-aignosi
2025-10-17 12:34:52 -03:00
parent 3326a7da00
commit 04cbce259f

View File

@@ -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