name: ๐Ÿงช Integration Testing on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test-integration: name: ๐Ÿ”ง Test Integration (${{ matrix.home-assistant-version }}, ${{ matrix.python-version }}) runs-on: ubuntu-latest strategy: matrix: python-version: ['3.13'] home-assistant-version: ['2025.9.4'] steps: - name: ๐Ÿ“ฅ Checkout uses: actions/checkout@v4 - name: ๐Ÿ Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: ๐Ÿ—‚๏ธ Cache pip dependencies id: pip-cache-dir run: echo "dir=$(pip cache dir)" >> "$GITHUB_OUTPUT" - name: ๐Ÿ“ฆ Cache pip uses: actions/cache@v4 with: path: ${{ steps.pip-cache-dir.outputs.dir }} key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} restore-keys: | ${{ runner.os }}-pip-${{ matrix.python-version }}- ${{ runner.os }}-pip- - name: ๐Ÿ“ฆ Install Python dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: ๐Ÿ“ Ensure custom_components package structure run: | mkdir -p custom_components touch custom_components/__init__.py - name: ๐Ÿงช Run pytest with coverage run: | python -m pytest tests/ -v \ --cov=custom_components/adguard_hub \ --cov-report=xml \ --cov-report=term-missing \ --asyncio-mode=auto - name: ๐Ÿ“Š Upload coverage reports if: always() run: | echo "Coverage report generated" ls -la coverage.xml || echo "No coverage.xml found"