-
Notifications
You must be signed in to change notification settings - Fork 384
67 lines (60 loc) · 1.71 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Test
on: [
pull_request,
push,
workflow_dispatch
]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [12.x, 13.x, 14.x, 15.x, 16.x, 17.x]
include:
- os: macos-latest
node-version: 14.x
- os: macos-latest
node-version: 16.x
- os: windows-2019
node-version: 14.x
- os: windows-2019
node-version: 16.x
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: echo npm version "$(npm --version)"
- run: echo node version "$(node --version)"
- run: npm ci
- run: npm run build:server
- run: npm run lint:server
- run: npm run test:e2e
# 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
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