Add compatibility tests (#12527)

* Add tests gh action

* Fix zigbee_ota_override_index_location

* Fix Shouldnt crash when it cannot save state test

* Add node17

* Update tests.yml

* Drop old versions

* Move to ci.yml

* Update controller.test.js

* Fix linebraks on windows

* Ignore windows and node 17

* Fail on error

* Add comment

* Mark node 18 as supported

Co-authored-by: nurikk <ainur@yojee.com>
This commit is contained in:
John Doe
2022-05-21 08:37:39 +02:00
committed by GitHub
co-authored by nurikk
parent 29a9d227de
commit 84bac2b8d8
5 changed files with 38 additions and 3 deletions
+31
View File
@@ -3,6 +3,37 @@ name: CI
on: [push, pull_request]
jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [14, 16, 17, 18]
exclude:
- os: windows-latest # https://github.com/serialport/node-serialport/issues/2344
node: 17
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
registry-url: https://registry.npmjs.org/
- name: Restore node_modules cache
id: cache-node-modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('npm-shrinkwrap.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Lint
run: npm run eslint
- name: Build
run: npm run build
- name: Test
run: npm run test-with-coverage
ci:
runs-on: ubuntu-latest
steps: