Skip to content

Commit

Permalink
Remove ip dependency (#18)
Browse files Browse the repository at this point in the history
* Remove ip dependency

* Fix linter

* Downgreade flatten agan

* Replace with reusable action?
  • Loading branch information
Supereg authored Feb 14, 2024
1 parent fd5a81e commit 2ba464f
Show file tree
Hide file tree
Showing 7 changed files with 2,905 additions and 1,437 deletions.
79 changes: 15 additions & 64 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,20 @@
name: Node-CI

name: Node Build
on:
push:
branches: master
branches: [master]
pull_request:
create: # Run when tag is created
workflow_dispatch:

jobs:
build:

strategy:
matrix:
node-version: [10.x, 12.x, 13.x]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build and test
run: |
npm ci
npm run build --if-present
npm run lint
npm run test-coverage
env:
CI: true
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
parallel: true

finish:
needs: build

runs-on: ubuntu-latest

steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true

publish-npm:
# publish only if we are on our own repo, event was 'create' (a tag was created) and the tag starts with "v" (aka version tag)
if: github.repository == 'homebridge/bonjour' && github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')

needs: build # only run if build succeeds

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10 # use the minimum required version
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
build_and_test:
uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest
with:
enable_coverage: true
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
lint:
needs: build_and_test
uses: homebridge/.github/.github/workflows/eslint.yml@latest
lint-docs:
needs: build_and_test
uses: homebridge/.github/.github/workflows/lint-docs.yml@latest
4 changes: 2 additions & 2 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Server.prototype = {
}

this.mdns.respond({
answers: answers,
additionals: additionals
answers,
additionals
}, err => {
if (err) throw err // TODO: Handle this (if no callback is given, the error will be ignored)
})
Expand Down
2 changes: 1 addition & 1 deletion lib/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const proto = {
type: 'TXT',
ttl: 4500,
flush: true,
data: data
data
}
},

Expand Down
2 changes: 1 addition & 1 deletion lib/utils/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ function resolveInterface (address) {
}

module.exports = {
resolveInterface: resolveInterface
resolveInterface
}
Loading

0 comments on commit 2ba464f

Please sign in to comment.