Some checks failed
Code Quality Check / Code Formatting (push) Failing after 23s
Code Quality Check / Security Analysis (push) Failing after 25s
Integration Testing / Integration Tests (2024.12.0, 3.13) (push) Failing after 1m38s
Integration Testing / Integration Tests (2025.9.4, 3.13) (push) Failing after 24s
Signed-off-by: Rafal Zielinski <sq4ind@gmail.com>
80 lines
2.0 KiB
YAML
80 lines
2.0 KiB
YAML
name: Code Quality Check
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
code-formatting:
|
|
name: Code Formatting
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
# FIXED: Added cache configuration
|
|
- name: Cache pip dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-formatting-${{ hashFiles('**/requirements-dev.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-formatting-
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install black isort flake8
|
|
|
|
- name: Code Formatting Check (Black)
|
|
run: |
|
|
echo "🔍 Checking code formatting with Black..."
|
|
black --check --diff --color custom_components/ tests/
|
|
|
|
- name: Import Sorting Check (isort)
|
|
run: |
|
|
echo "📦 Checking import sorting with isort..."
|
|
isort --check-only --diff --color custom_components/ tests/
|
|
|
|
- name: Linting (flake8)
|
|
run: |
|
|
echo "🔍 Linting code with flake8..."
|
|
flake8 custom_components/ tests/ --statistics --show-source
|
|
|
|
security-scan:
|
|
name: Security Analysis
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
- name: Install Security Tools
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install bandit safety
|
|
|
|
- name: Security Check (Bandit)
|
|
run: |
|
|
echo "🔒 Running security analysis with Bandit..."
|
|
bandit -r custom_components/ -ll
|
|
|
|
- name: Dependency Security Check (Safety)
|
|
run: |
|
|
echo "🔒 Checking dependencies with Safety..."
|
|
pip install -r requirements-dev.txt
|
|
safety check
|