iobroker.smartcontrol 1.3.2 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -62
- package/admin/i18n/de/translations.json +109 -0
- package/admin/i18n/en/translations.json +108 -0
- package/admin/i18n/es/translations.json +109 -0
- package/admin/i18n/fr/translations.json +109 -0
- package/admin/i18n/it/translations.json +109 -0
- package/admin/i18n/nl/translations.json +109 -0
- package/admin/i18n/pl/translations.json +109 -0
- package/admin/i18n/pt/translations.json +109 -0
- package/admin/i18n/ru/translations.json +109 -0
- package/admin/i18n/zh-cn/translations.json +109 -0
- package/admin/tsconfig.json +49 -0
- package/io-package.json +14 -13
- package/main.js +14 -4
- package/package.json +33 -19
- package/.github/ISSUE_TEMPLATE/BugReport.md +0 -36
- package/.github/ISSUE_TEMPLATE/Enhancement.md +0 -19
- package/.github/auto-merge.yml +0 -17
- package/.github/dependabot.yml +0 -12
- package/.github/workflows/dependabot-auto-merge.yml +0 -23
- package/.github/workflows/test-and-release.yml +0 -99
- package/.releaseconfig.json +0 -3
- package/main.test.js +0 -30
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
name: Test and Release
|
|
2
|
-
|
|
3
|
-
# Run this job on all pushes and pull requests
|
|
4
|
-
# as well as tags with a semantic version
|
|
5
|
-
on:
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- "main"
|
|
9
|
-
tags:
|
|
10
|
-
# normal versions
|
|
11
|
-
- "v[0-9]+.[0-9]+.[0-9]+"
|
|
12
|
-
# pre-releases
|
|
13
|
-
- "v[0-9]+.[0-9]+.[0-9]+-**"
|
|
14
|
-
pull_request: {}
|
|
15
|
-
|
|
16
|
-
jobs:
|
|
17
|
-
# Performs quick checks before the expensive test runs
|
|
18
|
-
check-and-lint:
|
|
19
|
-
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
|
20
|
-
|
|
21
|
-
runs-on: ubuntu-latest
|
|
22
|
-
|
|
23
|
-
strategy:
|
|
24
|
-
matrix:
|
|
25
|
-
node-version: [16.x]
|
|
26
|
-
|
|
27
|
-
steps:
|
|
28
|
-
- name: Checkout code
|
|
29
|
-
uses: actions/checkout@v3
|
|
30
|
-
|
|
31
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
32
|
-
uses: actions/setup-node@v3
|
|
33
|
-
with:
|
|
34
|
-
node-version: ${{ matrix.node-version }}
|
|
35
|
-
|
|
36
|
-
- name: Install Dependencies
|
|
37
|
-
run: npm ci
|
|
38
|
-
|
|
39
|
-
- name: Lint source code
|
|
40
|
-
run: npm run lint
|
|
41
|
-
- name: Test package files
|
|
42
|
-
run: npm run test:package
|
|
43
|
-
|
|
44
|
-
# Runs adapter tests on all supported node versions and OSes
|
|
45
|
-
adapter-tests:
|
|
46
|
-
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
|
47
|
-
|
|
48
|
-
needs: [check-and-lint]
|
|
49
|
-
|
|
50
|
-
runs-on: ${{ matrix.os }}
|
|
51
|
-
strategy:
|
|
52
|
-
matrix:
|
|
53
|
-
node-version: [14.x, 16.x]
|
|
54
|
-
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
55
|
-
|
|
56
|
-
steps:
|
|
57
|
-
- name: Checkout code
|
|
58
|
-
uses: actions/checkout@v3
|
|
59
|
-
|
|
60
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
61
|
-
uses: actions/setup-node@v3
|
|
62
|
-
with:
|
|
63
|
-
node-version: ${{ matrix.node-version }}
|
|
64
|
-
|
|
65
|
-
- name: Install Dependencies
|
|
66
|
-
run: npm ci
|
|
67
|
-
|
|
68
|
-
- name: Run unit tests
|
|
69
|
-
run: npm run test:unit
|
|
70
|
-
|
|
71
|
-
- name: Run integration tests (unix only)
|
|
72
|
-
if: startsWith(runner.OS, 'windows') == false
|
|
73
|
-
run: DEBUG=testing:* npm run test:integration
|
|
74
|
-
|
|
75
|
-
- name: Run integration tests (windows only)
|
|
76
|
-
if: startsWith(runner.OS, 'windows')
|
|
77
|
-
run: set DEBUG=testing:* & npm run test:integration
|
|
78
|
-
|
|
79
|
-
# Deploys the final package to NPM
|
|
80
|
-
deploy:
|
|
81
|
-
needs: [check-and-lint, adapter-tests]
|
|
82
|
-
|
|
83
|
-
# Trigger this step only when a commit on any branch is tagged with a version number
|
|
84
|
-
if: |
|
|
85
|
-
contains(github.event.head_commit.message, '[skip ci]') == false &&
|
|
86
|
-
github.event_name == 'push' &&
|
|
87
|
-
startsWith(github.ref, 'refs/tags/v')
|
|
88
|
-
|
|
89
|
-
runs-on: ubuntu-latest
|
|
90
|
-
|
|
91
|
-
steps:
|
|
92
|
-
- uses: ioBroker/testing-action-deploy@v1
|
|
93
|
-
with:
|
|
94
|
-
node-version: '16.x'
|
|
95
|
-
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
|
|
96
|
-
# install-command: 'npm install'
|
|
97
|
-
build: false
|
|
98
|
-
npm-token: ${{ secrets.NPM_TOKEN }}
|
|
99
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
package/.releaseconfig.json
DELETED
package/main.test.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This is a dummy TypeScript test file using chai and mocha
|
|
5
|
-
*
|
|
6
|
-
* It's automatically excluded from npm and its build output is excluded from both git and npm.
|
|
7
|
-
* It is advised to test all your modules with accompanying *.test.js-files
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
// tslint:disable:no-unused-expression
|
|
11
|
-
|
|
12
|
-
const { expect } = require('chai');
|
|
13
|
-
// import { functionToTest } from "./moduleToTest";
|
|
14
|
-
|
|
15
|
-
describe('module to test => function to test', () => {
|
|
16
|
-
// initializing logic
|
|
17
|
-
const expected = 5;
|
|
18
|
-
|
|
19
|
-
it(`should return ${expected}`, () => {
|
|
20
|
-
const result = 5;
|
|
21
|
-
// assign result a value from functionToTest
|
|
22
|
-
expect(result).to.equal(expected);
|
|
23
|
-
// or using the should() syntax
|
|
24
|
-
result.should.equal(expected);
|
|
25
|
-
});
|
|
26
|
-
// ... more tests => it
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// ... more test suites => describe
|