fix: fixes
Some checks failed
Integration Testing / Test Integration (2025.9.4, 3.13) (push) Failing after 38s
Code Quality Check / Code Quality Analysis (push) Successful in 15s

Signed-off-by: Rafal Zielinski <sq4ind@gmail.com>
This commit is contained in:
2025-09-28 15:58:07 +01:00
parent e0edf6f865
commit 86f60e72b7
21 changed files with 147 additions and 466 deletions

View File

@@ -1,4 +1,4 @@
name: 🛡️ Code Quality & Security Check
name: Code Quality Check
on:
push:
@@ -8,48 +8,32 @@ on:
jobs:
code-quality:
name: 🔍 Code Quality Analysis
name: Code Quality Analysis
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout Code
- name: Checkout Code
uses: actions/checkout@v4
- name: 🐍 Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: 📦 Install Dependencies
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 black isort mypy bandit safety
pip install flake8 black isort
pip install homeassistant==2025.9.4
pip install -r requirements-dev.txt || echo "No dev requirements found"
- name: 🎨 Check Code Formatting (Black)
- name: Code Formatting Check
run: |
black --check --diff custom_components/ || echo "Black formatting check completed"
black --check custom_components/ || echo "Code formatting issues found"
- name: 📊 Import Sorting (isort)
- name: Import Sorting
run: |
isort --check-only --diff custom_components/ || echo "isort check completed"
isort --check-only custom_components/ || echo "Import sorting issues found"
- name: 🔍 Linting (Flake8)
- name: Linting
run: |
flake8 custom_components/ --count --select=E9,F63,F7,F82 --show-source --statistics || echo "Critical flake8 issues found"
flake8 custom_components/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: 🔒 Security Scan (Bandit)
run: |
bandit -r custom_components/ -f json -o bandit-report.json || echo "Bandit scan completed"
bandit -r custom_components/ --severity-level medium || echo "Medium severity issues found"
- name: 🛡️ Dependency Security Check (Safety)
run: |
safety check --json --output safety-report.json || echo "Safety check completed"
safety check || echo "Dependency vulnerabilities found"
- name: 🏷️ Type Checking (MyPy)
run: |
mypy custom_components/ --ignore-missing-imports --no-strict-optional || echo "Type checking completed"
flake8 custom_components/ --count --select=E9,F63,F7,F82 --show-source --statistics || echo "Critical linting issues found"