Add Restart Homebridge to menu #575
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: Node Build | |
on: | |
push: | |
branches: [latest] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build_and_test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-2019] | |
uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest | |
with: | |
enable_coverage: false | |
## Code Coverage can only be used in a single run, not in a parallel run - Error: Bad response: 422 {"message":"Can't add a job to a build that is already closed. Build 6224987022 is closed. See docs.coveralls.io/parallel-builds","error":true} | |
## Coveralls only expects to create a report once per build | |
runs_on: ${{ matrix.os }} | |
install_cmd: npm ci && cd ui && npm ci | |
secrets: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
test_hb_service: | |
needs: build_and_test | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [18.x] | |
include: | |
- os: macos-latest | |
node-version: 18.x | |
- os: windows-2019 | |
node-version: 18.x | |
- os: windows-latest | |
node-version: 18.x | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- run: npm run build:server | |
- run: npm run lint:server | |
- run: npm run test | |
# remove dev deps | |
- run: npm clean-install --production | |
# test hb-service | |
- run: node dist/bin/hb-service.js -v | |
- if: runner.os == 'Linux' | |
name: 'Run hb-service install (Linux)' | |
run: | | |
sudo npm link | |
sudo npm install -g homebridge | |
sudo hb-service install --user homebridge --group `id -gn` | |
sleep 30 | |
- if: runner.os == 'macOS' | |
name: 'Run hb-service install (macOS)' | |
run: | | |
sudo npm link | |
sudo npm install -g homebridge | |
sudo hb-service install | |
sleep 30 | |
- if: runner.os == 'Windows' | |
name: 'Run hb-service install (Windows)' | |
run: | | |
npm link | |
npm install -g homebridge | |
hb-service install | |
Start-Sleep -s 30 | |
- name: 'Test hb-service install' | |
run: node dist/bin/hb-service.js status --port 8581 | |
- name: 'View Errors' | |
if: ${{ failure() }} | |
run: | | |
node dist/bin/hb-service.js view | |
exit 1 | |
lint: | |
needs: build_and_test | |
uses: homebridge/.github/.github/workflows/eslint.yml@latest | |
with: | |
install_cmd: npm ci && cd ui && npm ci |