Skip to content

Commit 8c41b4e

Browse files
committed
Update GitHub Actions workflows to use latest action versions and improve test coverage documentation
1 parent 483022c commit 8c41b4e

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.github/workflows/quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v4
1515

1616
- name: Set up Python 3.12
17-
uses: actions/setup-python@v4
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: "3.12"
2020

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
- uses: actions/checkout@v4
1818

1919
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v4
20+
uses: actions/setup-python@v5
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323

2424
- name: Cache pip dependencies
25-
uses: actions/cache@v3
25+
uses: actions/cache@v4
2626
with:
2727
path: ~/.cache/pip
2828
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-test.txt') }}
@@ -46,7 +46,7 @@ jobs:
4646
python -m pytest tests/ -v --asyncio-mode=auto
4747
4848
- name: Upload test results
49-
uses: actions/upload-artifact@v3
49+
uses: actions/upload-artifact@v4
5050
if: always()
5151
with:
5252
name: test-results-${{ matrix.python-version }}

tests/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@ python -m pytest tests/test_coordinator.py -v --asyncio-mode=auto
8181

8282
## Test Results Summary
8383

84-
**39 tests passing** across 4 test files
84+
**53 tests passing** across 4 test files
8585

8686
- `test_api_helpers.py`: 10 tests (pagination, HTTP errors, malformed responses)
8787
- `test_coordinator.py`: 15 tests (API failures, partial data, error propagation)
8888
- `test_unifi_device.py`: 9 tests (Unset values, missing attributes, device info)
89+
- `test_unifi_client.py`: 19 tests (client properties, MAC prioritization, DeviceInfo generation)
8990

9091
## Key Validated Scenarios
9192

@@ -95,4 +96,4 @@ python -m pytest tests/test_coordinator.py -v --asyncio-mode=auto
9596
4. **Error Propagation**: Errors are properly caught and logged, not leaked to users
9697
5. **Pagination**: Large datasets are fetched correctly even with API inconsistencies
9798

98-
The tests demonstrate that the integration is robust against real-world API issues and configuration scenarios without requiring a full Home Assistant installation.
99+
The tests demonstrate that the integration is robust against real-world API issues and configuration scenarios without requiring a full Home Assistant installation.

0 commit comments

Comments
 (0)