Skip to content

Commit 220c233

Browse files
authored
2 parents 3b1b095 + cdf7d8d commit 220c233

File tree

1,724 files changed

+149578
-20214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,724 files changed

+149578
-20214
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ tests
1414

1515
# Other virtualization methods
1616
venv
17+
.venv
1718
.vagrant
1819

1920
# Temporary files
20-
**/__pycache__
21+
**/__pycache__

.github/copilot-instructions.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,11 @@ async def test_flow_connection_error(hass, mock_api_error):
10731073

10741074
### Entity Testing Patterns
10751075
```python
1076-
@pytest.mark.parametrize("init_integration", [Platform.SENSOR], indirect=True)
1076+
@pytest.fixture
1077+
def platforms() -> list[Platform]:
1078+
"""Overridden fixture to specify platforms to test."""
1079+
return [Platform.SENSOR] # Or another specific platform as needed.
1080+
10771081
@pytest.mark.usefixtures("entity_registry_enabled_by_default", "init_integration")
10781082
async def test_entities(
10791083
hass: HomeAssistant,
@@ -1120,16 +1124,25 @@ def mock_device_api() -> Generator[MagicMock]:
11201124
)
11211125
yield api
11221126

1127+
@pytest.fixture
1128+
def platforms() -> list[Platform]:
1129+
"""Fixture to specify platforms to test."""
1130+
return PLATFORMS
1131+
11231132
@pytest.fixture
11241133
async def init_integration(
11251134
hass: HomeAssistant,
11261135
mock_config_entry: MockConfigEntry,
11271136
mock_device_api: MagicMock,
1137+
platforms: list[Platform],
11281138
) -> MockConfigEntry:
11291139
"""Set up the integration for testing."""
11301140
mock_config_entry.add_to_hass(hass)
1131-
await hass.config_entries.async_setup(mock_config_entry.entry_id)
1132-
await hass.async_block_till_done()
1141+
1142+
with patch("homeassistant.components.my_integration.PLATFORMS", platforms):
1143+
await hass.config_entries.async_setup(mock_config_entry.entry_id)
1144+
await hass.async_block_till_done()
1145+
11331146
return mock_config_entry
11341147
```
11351148

.github/workflows/builder.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
publish: ${{ steps.version.outputs.publish }}
2828
steps:
2929
- name: Checkout the repository
30-
uses: actions/checkout@v4.2.2
30+
uses: actions/checkout@v5.0.0
3131
with:
3232
fetch-depth: 0
3333

@@ -90,7 +90,7 @@ jobs:
9090
arch: ${{ fromJson(needs.init.outputs.architectures) }}
9191
steps:
9292
- name: Checkout the repository
93-
uses: actions/checkout@v4.2.2
93+
uses: actions/checkout@v5.0.0
9494

9595
- name: Download nightly wheels of frontend
9696
if: needs.init.outputs.channel == 'dev'
@@ -175,7 +175,7 @@ jobs:
175175
sed -i "s|pykrakenapi|# pykrakenapi|g" requirements_all.txt
176176
177177
- name: Download translations
178-
uses: actions/download-artifact@v4.3.0
178+
uses: actions/download-artifact@v5.0.0
179179
with:
180180
name: translations
181181

@@ -190,7 +190,7 @@ jobs:
190190
echo "${{ github.sha }};${{ github.ref }};${{ github.event_name }};${{ github.actor }}" > rootfs/OFFICIAL_IMAGE
191191
192192
- name: Login to GitHub Container Registry
193-
uses: docker/login-action@v3.4.0
193+
uses: docker/login-action@v3.5.0
194194
with:
195195
registry: ghcr.io
196196
username: ${{ github.repository_owner }}
@@ -242,7 +242,7 @@ jobs:
242242
- green
243243
steps:
244244
- name: Checkout the repository
245-
uses: actions/checkout@v4.2.2
245+
uses: actions/checkout@v5.0.0
246246

247247
- name: Set build additional args
248248
run: |
@@ -256,7 +256,7 @@ jobs:
256256
fi
257257
258258
- name: Login to GitHub Container Registry
259-
uses: docker/login-action@v3.4.0
259+
uses: docker/login-action@v3.5.0
260260
with:
261261
registry: ghcr.io
262262
username: ${{ github.repository_owner }}
@@ -279,7 +279,7 @@ jobs:
279279
runs-on: ubuntu-latest
280280
steps:
281281
- name: Checkout the repository
282-
uses: actions/checkout@v4.2.2
282+
uses: actions/checkout@v5.0.0
283283

284284
- name: Initialize git
285285
uses: home-assistant/actions/helpers/git-init@master
@@ -321,7 +321,7 @@ jobs:
321321
registry: ["ghcr.io/home-assistant", "docker.io/homeassistant"]
322322
steps:
323323
- name: Checkout the repository
324-
uses: actions/checkout@v4.2.2
324+
uses: actions/checkout@v5.0.0
325325

326326
- name: Install Cosign
327327
uses: sigstore/[email protected]
@@ -330,14 +330,14 @@ jobs:
330330

331331
- name: Login to DockerHub
332332
if: matrix.registry == 'docker.io/homeassistant'
333-
uses: docker/login-action@v3.4.0
333+
uses: docker/login-action@v3.5.0
334334
with:
335335
username: ${{ secrets.DOCKERHUB_USERNAME }}
336336
password: ${{ secrets.DOCKERHUB_TOKEN }}
337337

338338
- name: Login to GitHub Container Registry
339339
if: matrix.registry == 'ghcr.io/home-assistant'
340-
uses: docker/login-action@v3.4.0
340+
uses: docker/login-action@v3.5.0
341341
with:
342342
registry: ghcr.io
343343
username: ${{ github.repository_owner }}
@@ -454,15 +454,15 @@ jobs:
454454
if: github.repository_owner == 'home-assistant' && needs.init.outputs.publish == 'true'
455455
steps:
456456
- name: Checkout the repository
457-
uses: actions/checkout@v4.2.2
457+
uses: actions/checkout@v5.0.0
458458

459459
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
460460
uses: actions/[email protected]
461461
with:
462462
python-version: ${{ env.DEFAULT_PYTHON }}
463463

464464
- name: Download translations
465-
uses: actions/download-artifact@v4.3.0
465+
uses: actions/download-artifact@v5.0.0
466466
with:
467467
name: translations
468468

@@ -499,10 +499,10 @@ jobs:
499499
HASSFEST_IMAGE_TAG: ghcr.io/home-assistant/hassfest:${{ needs.init.outputs.version }}
500500
steps:
501501
- name: Checkout repository
502-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
502+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
503503

504504
- name: Login to GitHub Container Registry
505-
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
505+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
506506
with:
507507
registry: ghcr.io
508508
username: ${{ github.repository_owner }}

0 commit comments

Comments
 (0)