Fix the broken tests (#467)

* Update test_dependencies.py

pytest reversion todo in later commit

* increase verbosity for analysis

* "instance" was created in the basic features PR.

* Can't stand the deprecation warnings.

* add testing steps to workflow action in logs.

Help the next person running into this issue again.

* wording in new messages.

* Manifest keys should be sorted: domain, name, then alphabetical order

* return basnijholt's original settings.

replaced `-v` with `-qq` again in `pytest.yaml`,
returned `branches: [master]` in both yaml files.

* Forgot a comma

* Update version in manifest to 1.6.0

* @th3w1zard1 is a code owner!

* Update .gitignore

* Revert "Update .gitignore"

This reverts commit 172841d356.
This commit is contained in:
Benjamin Auquite 2023-03-26 17:04:13 -05:00 committed by GitHub
commit 06dcdbb4a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 11 deletions

View file

@ -11,5 +11,5 @@ jobs:
validate_hassfest:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/checkout@v3.0.2"
- uses: home-assistant/actions/hassfest@master

View file

@ -27,12 +27,22 @@ jobs:
uses: actions/setup-python@v4.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Click here for troubleshooting steps if tests break again.
run: |
echo "::notice::### If tests fail, try these debug steps: ###"
echo "::notice::### 1. Replace '-qq' from .github/workflow/pytest.yaml. with '-v' for extra verbosity. ###"
echo "::notice::### 2. Push or run action again. ###"
echo "::notice::### 3. Check for any log messages in github actions resembling the following using CTRL+F ###
echo "::notice::### 4. ERROR:homeassistant.setup:Setup failed for 'component': Unable to import component: No module named ''module'' ###"
echo "::notice::### 5. add 'component'.'module' (without the '') from the above log into the 'required' list inside of 'test_dependencies.py' ###"
echo "::notice::### 6. Try again! If more issues persist they should be easily solvable by reading the verbose logs now. ###"
- name: Install dependencies
run: |
pip install -r core/requirements.txt
pip install -r core/requirements_test.txt
pip install -e core/
pip install $(python test_dependencies.py)
echo "::warning::### WARNING! Deprecation warnings muted with option '--use-pep517' please address this at some point in pytest.yaml. ###"
pip install -r core/requirements.txt --use-pep517
pip install -r core/requirements_test.txt --use-pep517
pip install -e core/ --use-pep517
pip install $(python test_dependencies.py) --use-pep517
- name: Run pytest
timeout-minutes: 60
run: |

View file

@ -1,12 +1,12 @@
{
"domain": "adaptive_lighting",
"name": "Adaptive Lighting",
"documentation": "https://github.com/basnijholt/adaptive-lighting#readme",
"issue_tracker": "https://github.com/basnijholt/adaptive-lighting/issues",
"codeowners": ["@basnijholt", "@RubenKelevra", "@th3w1zard1"],
"config_flow": true,
"dependencies": [],
"codeowners": ["@basnijholt", "@RubenKelevra"],
"version": "1.4.1",
"documentation": "https://github.com/basnijholt/adaptive-lighting#readme",
"iot_class": "calculated",
"issue_tracker": "https://github.com/basnijholt/adaptive-lighting/issues",
"requirements": [],
"iot_class": "calculated"
"version": "1.6.0"
}

View file

@ -24,6 +24,7 @@ required = [
"components.zeroconf",
"components.http",
"components.stream",
"components.conversation",
]
to_install = []
for r in required:

View file

@ -223,7 +223,9 @@ async def test_adaptive_lighting_switches(hass):
assert ADAPT_COLOR_SWITCH in data
assert ADAPT_BRIGHTNESS_SWITCH in data
assert UNDO_UPDATE_LISTENER in data
assert len(data.keys()) == 5
assert "instance" in data
assert len(data.keys()) == 6
@pytest.mark.parametrize("lat,long,timezone", LAT_LONG_TZS)