Skip to content

Commit

Permalink
Improve test output.
Browse files Browse the repository at this point in the history
Output summary of coverage.
Surface the test failures in the workflow summary rather than having
to drill down to the logs.

Fix qoto sprinkler tests after removal of valve deprecations.

Update quality scale scoresheet, standardise statuses.
  • Loading branch information
make-all committed Jan 12, 2025
1 parent 4dbff38 commit 3199143
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 29 deletions.
4 changes: 3 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[run]
branch = True
# branch = True
branch = False

[report]
skip_empty = True
skip_covered = True
include = custom_components/*
11 changes: 10 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,13 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Full test with pytest
run: pytest --cov=. --cov-config=.coveragerc --cov-report xml:coverage.xml
run: pytest --cov=custom_components/tuya_local --cov-report term:skip-covered --junit-xml=test-results.xml
- name: Surface results
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results
40 changes: 20 additions & 20 deletions quality_scale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ rules:
test-before-configure: done
unique-config-entry: done
config-flow-test-coverage:
status: tbd
comment: Not measured since SonarCloud github integration broke
status: todo
comment: line-rate="0.5019" branch-rate="0.2872", target 100%
runtime-data:
status: todo
comment: issue #1884
Expand All @@ -22,36 +22,36 @@ rules:
comment: issue #1916
dependency-transparency: done
action-setup:
status: not applicable
status: exempt
comment: actions not implemented
common-modules:
status: partial
status: todo
comment: entity done, coordinator in connection rewrite
docs-high-level-description:
status: todo
comment: need link to Tuya
docs-installation-instructions:
status: tbd
status: todo
comment: to review
docs-removal-instructions:
status: todo
comment: need adding
docs-actions:
status: not applicable
status: exempt
comment: actions not implemented
brands:
status: tbd
status: todo
comment: currently using Tuya logo, do we need a unique one?
# Silver
config-entry-unloading: done
log-when-unavailable:
status: partial
status: todo
comment: log when coming back online may be needed
entity-unavailable:
status: tbd
status: todo
comment: need review to ensure logic is correct
action-exceptions:
status: not applicable
status: exempt
comment: actions not implemented
reauthentication-flow:
status: todo
Expand All @@ -60,18 +60,18 @@ rules:
status: todo
comment: especially for hubs
test-coverage:
status: tbd
comment: unmeasured since SonarCloud github connection stopped working
status: todo
comment: line-rate="0.7859" branch-rate="0.6018", target 95%
integration-owner: done
docs-installation-parameters:
status: tbd
status: todo
comment: needs review
docs-configuration-parameters:
status: tbd
status: todo
comment: needs review
# Gold
entity-translations:
status: partial
status: todo
comment: issue #1708
entity-device-class: done
devices: done
Expand All @@ -90,7 +90,7 @@ rules:
status: todo
comment: review which exceptions escape through to the user
icon-translations:
status: partial
status: todo
comment: issue #1708
reconfiguration-flow:
status: todo
Expand All @@ -107,16 +107,16 @@ rules:
comment: due to breadth of support, what can be documented?
docs-supported-devices: done
docs-supported-functions:
status: tbd
status: todo
comment: needs review
docs-data-update:
status: tbd
status: todo
comment: needs review
docs-known-limitations:
status: tbd
status: todo
comment: needs review
docs-troubleshooting:
status: tbd
status: todo
comment: needs review
docs-examples:
status: todo
Expand Down
7 changes: 0 additions & 7 deletions tests/devices/test_qoto_03_sprinkler.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ def setUp(self):
)
self.setUpMultiNumber(
[
{
"name": "number",
"dps": TARGET_DPS,
"max": 100,
"step": 5,
"unit": PERCENTAGE,
},
{
"name": "number_timer",
"dps": TIMER_DPS,
Expand Down

0 comments on commit 3199143

Please sign in to comment.