Some checks failed
Integration Testing / Integration Tests (2024.12.0, 3.11) (push) Failing after 22s
Integration Testing / Integration Tests (2024.12.0, 3.12) (push) Failing after 21s
Integration Testing / Integration Tests (2024.12.0, 3.13) (push) Failing after 1m32s
Integration Testing / Integration Tests (2025.9.4, 3.11) (push) Failing after 15s
Integration Testing / Integration Tests (2025.9.4, 3.12) (push) Failing after 20s
Integration Testing / Integration Tests (2025.9.4, 3.13) (push) Failing after 20s
Signed-off-by: Rafal Zielinski <sq4ind@gmail.com>
73 lines
2.1 KiB
YAML
73 lines
2.1 KiB
YAML
name: Integration Testing
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
test-integration:
|
|
name: Integration Tests
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.11", "3.12", "3.13"]
|
|
home-assistant-version: ["2024.12.0", "2025.9.4"]
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install homeassistant==${{ matrix.home-assistant-version }}
|
|
pip install -r requirements-dev.txt
|
|
|
|
- name: Ensure Package Structure
|
|
run: |
|
|
mkdir -p custom_components
|
|
touch custom_components/__init__.py
|
|
|
|
- name: Run Unit Tests
|
|
run: |
|
|
python -m pytest tests/ -v --tb=short --cov=custom_components/adguard_hub --cov-report=xml --cov-report=term-missing --asyncio-mode=auto --cov-fail-under=60
|
|
|
|
- name: Test Installation
|
|
run: |
|
|
python -c "
|
|
import sys
|
|
sys.path.insert(0, 'custom_components')
|
|
try:
|
|
from adguard_hub import DOMAIN
|
|
print(f'✅ Integration can be imported, domain: {DOMAIN}')
|
|
except Exception as e:
|
|
print(f'❌ Import failed: {e}')
|
|
sys.exit(1)
|
|
"
|
|
|
|
- name: Test Manifest Validation
|
|
run: |
|
|
python -c "
|
|
import json
|
|
import sys
|
|
try:
|
|
with open('custom_components/adguard_hub/manifest.json', 'r') as f:
|
|
manifest = json.load(f)
|
|
required_keys = ['domain', 'name', 'version', 'documentation', 'requirements']
|
|
missing = [k for k in required_keys if k not in manifest]
|
|
if missing:
|
|
print(f'❌ Missing manifest keys: {missing}')
|
|
sys.exit(1)
|
|
print('✅ Manifest is valid')
|
|
except Exception as e:
|
|
print(f'❌ Manifest validation failed: {e}')
|
|
sys.exit(1)
|
|
"
|