diff --git a/.gitea/workflows/integration-test.yml b/.gitea/workflows/integration-test.yml index bd11d28..645169b 100644 --- a/.gitea/workflows/integration-test.yml +++ b/.gitea/workflows/integration-test.yml @@ -1,3 +1,4 @@ +# .github/workflows/integration-tests.yml name: ๐Ÿงช Integration Testing on: @@ -12,24 +13,23 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.11', '3.12', '3.13'] + python-version: ['3.13'] home-assistant-version: ['2025.9.4'] steps: - - name: ๐Ÿ“ฅ Checkout Code + - name: ๐Ÿ“ฅ Checkout uses: actions/checkout@v4 - - name: ๐Ÿ Set up Python ${{ matrix.python-version }} + - name: ๐Ÿ Set up Python uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: ๐Ÿ—‚๏ธ Get pip cache directory + - name: ๐Ÿ—‚๏ธ Cache pip id: pip-cache-dir - run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(pip cache dir)" >> "$GITHUB_OUTPUT" - - name: ๐Ÿ“ฆ Cache pip dependencies - uses: actions/cache@v4 + - uses: actions/cache@v4 with: path: ${{ steps.pip-cache-dir.outputs.dir }} key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} @@ -37,19 +37,20 @@ jobs: ${{ runner.os }}-pip-${{ matrix.python-version }}- ${{ runner.os }}-pip- - - name: ๐Ÿ“ฆ Install Dependencies + - name: ๐Ÿ“ฆ Install deps run: | - python -m pip install --upgrade pip + python -m pip install -U pip pip install -r requirements.txt - - name: ๐Ÿ“ Create custom_components directory + - name: ๐Ÿ“ Ensure custom_components package 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 + - name: ๐Ÿงช Pytest + run: | + python -m pytest tests/ -v \ + --cov=custom_components/adguard_hub \ + --cov-report=xml \ + --cov-report=term-missing \ + --asyncio-mode=auto diff --git a/requirements.txt b/requirements.txt index f3b0a34..6c6df70 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ homeassistant==2025.9.4 pytest pytest-homeassistant-custom-component pytest-asyncio -pytest-cov +pytest-cov \ No newline at end of file