Skip to content

Commit

Permalink
update workflow; add sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
sim0nx committed Nov 3, 2024
1 parent 2e3bfc0 commit 028cd88
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/test_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ jobs:
tests:
runs-on: ubuntu-latest

services:
openhab:
image: openhab/openhab:latest
env:
OPENHAB_HTTP_PORT: 8080
ports:
- 8080:8080
volumes:
- ${{ github.workspace }}/docker/openhab_conf:/openhab/conf

strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
Expand All @@ -28,8 +38,6 @@ jobs:
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade-strategy eager .[test]
docker run -d --name openhab -p 8080:8080 -e OPENHAB_HTTP_PORT=8080 -v ${{ github.workspace }}/docker/openhab_conf:/openhab/conf "openhab/openhab:latest"
python3 docker/test_connectivity.py
docker exec -i openhab /openhab/runtime/bin/client -v -p habopen users add admin admin administrator || true
Expand Down
1 change: 1 addition & 0 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def test_number_temperature(oh: openhab.OpenHAB):

# Unit of measure conversion (performed by OpenHAB server)
temperature_item.state = (32, '°F')
time.sleep(1)
assert round(temperature_item.state, 2) == 0
temperature_item.state = (212, '°F')
time.sleep(1)
Expand Down

0 comments on commit 028cd88

Please sign in to comment.