Skip to content

Fan only mode support #38

Fan only mode support

Fan only mode support #38

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build and Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
environment: predeployment
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Create directories for config.json file and clientId file
run: sudo mkdir -p /var/lib/homebridge/ && sudo mkdir -p /var/lib/homebridge/homebridge-actron-que-persist/
- name: Create files for config file and clientId file
run: sudo touch /var/lib/homebridge/config.json && sudo touch /var/lib/homebridge/homebridge-actron-que-persist/clientid.token
- name: Update permissions for created directories
run: sudo chmod -R 0777 /var/lib/homebridge/ && sudo chmod -R 0777 /var/lib/homebridge/homebridge-actron-que-persist/
- name: Populate clientId file
uses: devops-actions/[email protected]
with:
json: '[{"name": "homebridgeQueCommitTest", "id": "homebridgeQueCommitTest-12345"}]'
filename: /var/lib/homebridge/homebridge-actron-que-persist/clientid.token
- name: Populate Homebridge config.json file
uses: devops-actions/[email protected]
with:
json: '{
"bridge": {
"name": "Homebridge Test",
"username": "FF:FF:FF:FF:FF:FF",
"port": 54321,
"pin": "123-45-678"
},
"platforms": [
{
"name": "ActronQue",
"username": "${{ secrets.USERNAME }}",
"password": "${{ secrets.PASSWORD }}",
"zonesFollowMaster": true,
"zonesPushMaster": true,
"clientName": "homebridgeQueCommitTest",
"refreshInterval": 60,
"platform": "ActronQue"
}
]
}'
filename: /var/lib/homebridge/config.json
- name: Clean install npm
run: npm ci
- name: Run commit script to test Homebridge integration of plugin - always exits cleanly
run: timeout --preserve-status -k 120s 120s npm run commit || true
- name: Check log to confirm login to ActronQue Cloud
run: cat /var/lib/homebridge/homebridge.log | egrep 'located serial number .{8} with ID of .*'
- name: Check log to confirm status retrieved from ActronQue Cloud
run: cat /var/lib/homebridge/homebridge.log | egrep 'Got current status from Actron Cloud'
- name: Check log to confirm no API error
run: cat /var/lib/homebridge/homebridge.log | egrep '{"apiError":false,'
- name: Check log to confirm creation of Actron master controller
run: cat /var/lib/homebridge/homebridge.log | egrep 'Adding new accessory. homebridgeQueCommitTest$'
- name: Check log to confirm creation of Actron outdoor unit
run: cat /var/lib/homebridge/homebridge.log | egrep 'Adding new accessory. homebridgeQueCommitTest-outdoorUnit'