Files
adguard-control-hub/.gitea/workflows/integration-test.yml
Rafal Zielinski bbc7f72578
Some checks failed
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.11) (push) Failing after 48s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.12) (push) Failing after 20s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.13) (push) Failing after 1m17s
🛡️ Code Quality & Security Check / 🔍 Code Quality Analysis (push) Failing after 20s
fix: minor fixes to integration tests
Signed-off-by: Rafal Zielinski <sq4ind@gmail.com>
2025-09-28 14:09:34 +01:00

78 lines
2.6 KiB
YAML

name: 🧪 Integration Testing
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test-integration:
name: 🔧 Test Integration
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.12', '3.13']
home-assistant-version: ['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: 🗂️ Get pip cache directory
id: pip-cache-dir
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: 📦 Cache pip dependencies
uses: actions/cache@v4
id: pip-cache
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt', 'setup.py', 'setup.cfg', 'pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: 📦 Cache Home Assistant installation
uses: actions/cache@v4
id: homeassistant-cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-ha-${{ matrix.python-version }}-${{ matrix.home-assistant-version }}-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-ha-${{ matrix.python-version }}-${{ matrix.home-assistant-version }}-
${{ runner.os }}-ha-${{ matrix.python-version }}-
- name: 📦 Install Dependencies
if: steps.homeassistant-cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install homeassistant==${{ matrix.home-assistant-version }}
pip install pytest pytest-homeassistant-custom-component pytest-asyncio pytest-cov
- name: 📦 Install additional dependencies (if cache miss)
if: steps.pip-cache.outputs.cache-hit != 'true'
run: |
# Install any additional project-specific dependencies
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: 📁 Create custom_components directory
run: |
mkdir -p custom_components
touch custom_components/__init__.py
- name: 🧪 Run Integration Tests
run: |
python -m pytest tests/ -v \
--cov=custom_components/adguard_hub \
--cov-report=xml \
--cov-report=term-missing \
--asyncio-mode=auto