40 lines
960 B
YAML
40 lines
960 B
YAML
name: Code Quality Check
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
code-quality:
|
|
name: Code Quality 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 Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install flake8 black isort
|
|
pip install homeassistant==2025.9.4
|
|
|
|
- name: Code Formatting Check
|
|
run: |
|
|
black --check custom_components/ || echo "Code formatting issues found"
|
|
|
|
- name: Import Sorting
|
|
run: |
|
|
isort --check-only custom_components/ || echo "Import sorting issues found"
|
|
|
|
- name: Linting
|
|
run: |
|
|
flake8 custom_components/ --count --select=E9,F63,F7,F82 --show-source --statistics || echo "Critical linting issues found"
|