forked from ioBroker/ioBroker
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.31 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
name: Test
# Run this job on all pushes and pull requests
on:
push:
branches:
- "*"
pull_request: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-test
cancel-in-progress: true
jobs:
# ===================
# Runs unit tests on all supported node versions and OSes
test-install:
if: contains(github.event.head_commit.message, '[skip ci]') == false
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Fix up installer script for local installs
run: |
# remove download of library
sed '/# get and load the LIB => START/,/# get and load the LIB => END/d' installer.sh
# and source it manually
source ./installer_library.sh
- name: Install ioBroker
run: bash ./installer.sh --silent
- name: Test permissions
# TODO: test this on OSX too!
if: startsWith(runner.OS, 'ubuntu')
run: bash .github/testFiles.sh
- name: Prepare tests
run: npm install mocha chai
- name: Test if ioBroker starts by checking the admin adapter output
run: curl --insecure http://127.0.0.1:8081 2> /dev/null | grep '<title>Admin</title>' &> /dev/null || exit 1