fix: fixing integration tests
Some checks failed
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.11) (push) Failing after 20s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.12) (push) Failing after 21s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.13) (push) Failing after 1m21s
🛡️ Code Quality & Security Check / 🔍 Code Quality Analysis (push) Failing after 18s
Some checks failed
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.11) (push) Failing after 20s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.12) (push) Failing after 21s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.13) (push) Failing after 1m21s
🛡️ Code Quality & Security Check / 🔍 Code Quality Analysis (push) Failing after 18s
Signed-off-by: Rafal Zielinski <sq4ind@gmail.com>
This commit is contained in:
@@ -26,42 +26,21 @@ jobs:
|
|||||||
|
|
||||||
- name: 🗂️ Get pip cache directory
|
- name: 🗂️ Get pip cache directory
|
||||||
id: pip-cache-dir
|
id: pip-cache-dir
|
||||||
run: |
|
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
|
||||||
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: 📦 Cache pip dependencies
|
- name: 📦 Cache pip dependencies
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
id: pip-cache
|
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||||
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt', 'setup.py', 'setup.cfg', 'pyproject.toml') }}
|
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pip-${{ matrix.python-version }}-
|
${{ runner.os }}-pip-${{ matrix.python-version }}-
|
||||||
${{ runner.os }}-pip-
|
${{ 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
|
- name: 📦 Install Dependencies
|
||||||
if: steps.homeassistant-cache.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install homeassistant==${{ matrix.home-assistant-version }}
|
pip install -r requirements.txt
|
||||||
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
|
- name: 📁 Create custom_components directory
|
||||||
run: |
|
run: |
|
||||||
@@ -69,9 +48,8 @@ jobs:
|
|||||||
touch custom_components/__init__.py
|
touch custom_components/__init__.py
|
||||||
|
|
||||||
- name: 🧪 Run Integration Tests
|
- name: 🧪 Run Integration Tests
|
||||||
run: |
|
run: python -m pytest tests/ -v \
|
||||||
python -m pytest tests/ -v \
|
--cov=custom_components/adguard_hub \
|
||||||
--cov=custom_components/adguard_hub \
|
--cov-report=xml \
|
||||||
--cov-report=xml \
|
--cov-report=term-missing \
|
||||||
--cov-report=term-missing \
|
--asyncio-mode=auto
|
||||||
--asyncio-mode=auto
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
homeassistant>=2025.9.4
|
homeassistant==2025.9.4
|
||||||
pytest>=7.0.0
|
pytest
|
||||||
pytest-homeassistant-custom-component>=2025.9.0
|
pytest-homeassistant-custom-component
|
||||||
pytest-asyncio>=0.21.0
|
pytest-asyncio
|
||||||
pytest-cov>=4.0.0
|
pytest-cov
|
||||||
|
Reference in New Issue
Block a user