-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolution of hb-service update-node and restore issues (#1490)
- Loading branch information
1 parent
8e1dc55
commit 2373453
Showing
33 changed files
with
1,613 additions
and
1,188 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# The GitHub release configuration file: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes | ||
|
||
changelog: | ||
categories: | ||
- title: Breaking Changes 🛠 | ||
labels: | ||
- 'breaking change' | ||
- title: Featured Changes ✨ | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- title: Bug Fixes 🐛 | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: Other Changes | ||
labels: | ||
- "chore" | ||
- "housekeeping" | ||
- "*" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Attach Artifacts | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
name: Attach Artifact | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
|
||
# Sanity check to ensure that release tags don't start with a 'v' version prefix but adhere to the X.Y.Z format | ||
- name: Check for Tag name Format | ||
if: startWith(${{github.event.release.tag_name}}, 'v') | ||
run: | | ||
echo "Tag name must not start with 'v' Prefix" | ||
exit 1 | ||
- name: Install package | ||
run: | | ||
export npm_config_prefix=$(pwd)/package | ||
npm install -g homebridge-config-ui-x@${{ github.event.release.tag_name }} | ||
- name: Create Bundle | ||
run: | | ||
tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz . | ||
shasum -a 256 homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz > SHASUMS256.txt | ||
- name: Attach Bundle | ||
uses: AButler/upload-release-assets@v2.0 | ||
with: | ||
files: 'homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz;SHASUMS256.txt' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
release-tag: ${{ github.event.release.tag_name }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Node-CI Beta | ||
|
||
on: | ||
push: | ||
branches: [beta-*.*.*, beta] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_test: | ||
uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@main | ||
with: | ||
enable_coverage: true | ||
install_cmd: npm ci && cd ui && npm ci | ||
secrets: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
lint: | ||
needs: build_and_test | ||
uses: homebridge/.github/.github/workflows/eslint.yml@main | ||
with: | ||
install_cmd: npm ci && cd ui && npm ci | ||
|
||
publish: | ||
needs: lint | ||
|
||
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }} | ||
|
||
uses: homebridge/.github/.github/workflows/npm-publish.yml@main | ||
with: | ||
tag: 'test' | ||
dynamically_adjust_version: true | ||
npm_version_command: 'pre' | ||
pre_id: 'test' | ||
install_cmd: npm ci && cd ui && npm ci | ||
secrets: | ||
npm_auth_token: ${{ secrets.npm_token }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Node Build | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
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@main | ||
with: | ||
enable_coverage: true | ||
secrets: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
test_hb_service: | ||
needs: build_and_test | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [16.x, 17.x, 18.x] | ||
include: | ||
- os: macos-latest | ||
node-version: 16.x | ||
- os: macos-latest | ||
node-version: 18.x | ||
- os: windows-2019 | ||
node-version: 16.x | ||
- os: windows-2019 | ||
node-version: 18.x | ||
- os: windows-latest | ||
node-version: 16.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@main |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ master, beta* ] | ||
pull_request: | ||
branches: [ master, beta* ] | ||
schedule: | ||
- cron: '17 9 * * 2' | ||
|
||
jobs: | ||
analyze: | ||
uses: homebridge/.github/.github/workflows/codeql-analysis.yml@main |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: PR Labeler | ||
|
||
on: | ||
pull_request: # required for auto labeler | ||
types: [opened, reopened, synchronize] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
stale: | ||
uses: homebridge/.github/.github/workflows/pr-labeler.yml@main | ||
secrets: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Node Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_test: | ||
uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@main | ||
with: | ||
enable_coverage: true | ||
secrets: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish: | ||
needs: build_and_test | ||
|
||
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }} | ||
|
||
uses: homebridge/.github/.github/workflows/npm-publish.yml@main | ||
with: | ||
install_cmd: npm ci && cd ui && npm ci | ||
secrets: | ||
npm_auth_token: ${{ secrets.npm_token }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
name: 'Stale Bot' | ||
name: Stale workflow | ||
|
||
on: | ||
schedule: | ||
- cron: '30 1 * * *' | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '45 11 * * *' | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v3 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-issue-label: stale | ||
exempt-issue-labels: pinned,security | ||
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' | ||
days-before-issue-stale: 30 | ||
days-before-issue-close: 5 | ||
days-before-pr-close: -1 | ||
days-before-pr-stale: -1 | ||
uses: homebridge/.github/.github/workflows/stale.yml@main | ||
secrets: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.