Skip to content

#119 feat(ui): Refresh devices, sensors and floorplan when config changes #137

#119 feat(ui): Refresh devices, sensors and floorplan when config changes

#119 feat(ui): Refresh devices, sensors and floorplan when config changes #137

Workflow file for this run

name: Test PowerPi
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check modified projects
id: check_modified
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/check_modified.sh"
# setup node.js
- name: Install Node.js
if: steps.check_modified.outputs.nodejs
uses: actions/setup-node@v4
with:
node-version: 20.x
# install node.js dependencies
- name: Install Node.js dependencies
if: steps.check_modified.outputs.nodejs
run: |
yarn install
yarn build:lib
# setup python
- name: Install Python
if: steps.check_modified.outputs.python
uses: actions/setup-python@v5
with:
python-version: "3.11"
# setup poetry
- name: Install Poetry
if: steps.check_modified.outputs.python
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
# test the common libraries
- name: Test PowerPi Node Common
if: steps.check_modified.outputs.node_common
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_node.sh common"
- name: Test PowerPi Python Common
if: steps.check_modified.outputs.python_common
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_python.sh python_common"
working-directory: common/python
# test the controllers
- name: Test Energenie Controller
if: steps.check_modified.outputs.energenie_controller
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_python.sh energenie"
working-directory: controllers/energenie
- name: Test Harmony Controller
if: steps.check_modified.outputs.harmony_controller
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_python.sh harmony"
working-directory: controllers/harmony
- name: Test LIFX Controller
if: steps.check_modified.outputs.lifx_controller
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_python.sh lifx"
working-directory: controllers/lifx
- name: Test Network Controller
if: steps.check_modified.outputs.network_controller
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_python.sh network"
working-directory: controllers/network
- name: Test Snapcast Controller
if: steps.check_modified.outputs.snapcast_controller
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_python.sh snapcast"
working-directory: controllers/snapcast
- name: Test Virtual Controller
if: steps.check_modified.outputs.virtual_controller
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_python.sh virtual"
working-directory: controllers/virtual
- name: Test ZigBee Controller
if: steps.check_modified.outputs.zigbee_controller
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_python.sh zigbee"
working-directory: controllers/zigbee
# test the services
- name: Test API
if: steps.check_modified.outputs.api
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_node.sh api"
- name: Test Config Server
if: steps.check_modified.outputs.config_server
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_node.sh config-server"
- name: Test Event Service
if: steps.check_modified.outputs.event
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_python.sh event"
working-directory: services/event
- name: Test Persistence
if: steps.check_modified.outputs.persistence
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_node.sh persistence"
- name: Test Scheduler
if: steps.check_modified.outputs.scheduler
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_python.sh scheduler"
working-directory: services/scheduler
- name: Test UI
if: steps.check_modified.outputs.ui
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_node.sh ui"
- name: Test Voice Assistant
if: steps.check_modified.outputs.voice_assistant
shell: bash
run: "${GITHUB_WORKSPACE}/.github/scripts/test_node.sh voice-assistant"