- stability improvements #34
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Python Unittests that do not need a openHAB instance | |
env: | |
OH_HOST: 'http://0.0.0.0:8080' | |
PHASE_1_CONSUMPTION_WATT_OH_ITEM: 'unit_tests_smart_meter_phase_1_consumption' | |
PHASE_2_CONSUMPTION_WATT_OH_ITEM: 'unit_tests_smart_meter_phase_2_consumption' | |
PHASE_3_CONSUMPTION_WATT_OH_ITEM: 'unit_tests_smart_meter_phase_3_consumption' | |
OVERALL_CONSUMPTION_WATT_OH_ITEM: 'unit_tests_smart_meter_overall_consumption' | |
OVERALL_CONSUMPTION_WH_OH_ITEM: 'unit_tests_smart_meter_overall_consumption_wh' | |
ELECTRICITY_METER_KWH_OH_ITEM: 'unit_tests_smart_meter_electricity_meter' | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build-n-run-tests: | |
name: Build the project and run unittests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up python 3.11 | |
id: setup-python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.11' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Install dependencies | |
run: poetry install --without dev --no-interaction | |
- name: Run Tests | |
run: | | |
source .venv/bin/activate | |
python3 -m unittest tests.test_interfaces tests.test_openhab_utils tests.test_sml --verbose |