Skip to content

Commit

Permalink
Merge pull request #478 from Black-Thunder/fix-adapter-checker-issues
Browse files Browse the repository at this point in the history
Fix adapter checker issues
  • Loading branch information
Black-Thunder authored Mar 24, 2023
2 parents ca104ae + 3fc50a2 commit 6385bc9
Show file tree
Hide file tree
Showing 28 changed files with 3,283 additions and 905 deletions.
11 changes: 8 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@
"SwitchCase": 1
}
],
"no-unused-vars": ["error", { "argsIgnorePattern": "^_", "caughtErrors": "all" }],
"no-console": "off",
"no-unused-vars": [
"error",
{
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_"
}
],
"no-var": "error",
"no-trailing-spaces": "error",
"prefer-const": "error",
"prefer-template": "warn",
"quotes": [
"error",
"double",
Expand All @@ -37,6 +42,6 @@
]
},
"parserOptions": {
"ecmaVersion": 2019
"ecmaVersion": 2020
}
}
91 changes: 51 additions & 40 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,73 +5,84 @@ name: Test and Release
on:
push:
branches:
- "*"
- "main"
tags:
# normal versions
- "v[0-9]+.[0-9]+.[0-9]+"
# pre-releases
- "v[0-9]+.[0-9]+.[0-9]+-**"
pull_request: {}

# Cancel previous PR/branch runs when a new commit is pushed
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
# Performs quick checks before the expensive test runs
check-and-lint:
if: contains(github.event.head_commit.message, '[skip ci]') == false

runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x] # This should be LTS

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- uses: ioBroker/testing-action-check@v1
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Perform a type check
run: npm run check
env:
CI: true

- name: Lint TypeScript code
run: npm run lint

# ===================
node-version: '16.x'
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'
lint: true

# Runs unit tests on all supported node versions and OSes
unit-tests:
# Runs adapter tests on all supported node versions and OSes
adapter-tests:
if: contains(github.event.head_commit.message, '[skip ci]') == false

needs: [check-and-lint]

runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- uses: ioBroker/testing-action-adapter@v1
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
os: ${{ matrix.os }}
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'

# Deploys the final package to NPM
deploy:
needs: [check-and-lint, adapter-tests]

# Trigger this step only when a commit on any branch is tagged with a version number
if: |
contains(github.event.head_commit.message, '[skip ci]') == false &&
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/v')
- name: Install dependencies
run: npm ci
runs-on: ubuntu-latest

# Write permissions are required to create Github releases
permissions:
contents: write

- name: Run component tests
run: npm run test
env:
CI: true
steps:
- uses: ioBroker/testing-action-deploy@v1
with:
node-version: '16.x'
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'
npm-token: ${{ secrets.NPM_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}

# When using Sentry for error reporting, Sentry can be informed about new releases
# To enable create a API-Token in Sentry (User settings, API keys)
# Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options
# Then uncomment and customize the following block:
# sentry: true
# sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
# sentry-project: "iobroker-roborock"
# sentry-version-prefix: "iobroker.roborock"
# # If your sentry project is linked to a GitHub repository, you can enable the following option
# # sentry-github-integration: true
3 changes: 0 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,5 @@ tsconfig.*.json
iobroker.*.tgz
package-lock.json

# i18n intermediate files
admin/i18n

# maintenance scripts
maintenance/**
6 changes: 6 additions & 0 deletions .releaseconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"plugins": [
"iobroker",
"license"
]
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Documentation:
### __WORK IN PROGRESS__
* (Black-Thunder) fixed "undefined is not a valid state value" log messages
* (Black-Thunder) fixed crash after connection is lost (e.g. due to missing internet connection)
* (Black-Thunder) fixed a lot of adapter checker issues and warnings

### 1.3.0 (2023-03-17)
* (Black-Thunder) added online status to each device (visible in admin object tree)
Expand Down
1 change: 0 additions & 1 deletion admin/admin.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion admin/i18n/de/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"Password": "Passwort",
"Polling interval": "Abrufintervall",
"Select language": "Sprache auswählen"
}
}
2 changes: 1 addition & 1 deletion admin/i18n/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"Password": "Password",
"Polling interval": "Polling interval",
"Select language": "Select language"
}
}
2 changes: 1 addition & 1 deletion admin/i18n/es/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"Password": "Contraseña",
"Polling interval": "Intervalo de votación",
"Select language": "Seleccione el idioma"
}
}
2 changes: 1 addition & 1 deletion admin/i18n/fr/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"Password": "Mot de passe",
"Polling interval": "Intervalle d'interrogation",
"Select language": "Choisir la langue"
}
}
2 changes: 1 addition & 1 deletion admin/i18n/it/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"Password": "Parola d'ordine",
"Polling interval": "Intervallo di polling",
"Select language": "Seleziona la lingua"
}
}
2 changes: 1 addition & 1 deletion admin/i18n/nl/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"Password": "Wachtwoord",
"Polling interval": "Polling-interval",
"Select language": "Selecteer taal"
}
}
2 changes: 1 addition & 1 deletion admin/i18n/pl/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"Password": "Hasło",
"Polling interval": "Interwał odpytywania",
"Select language": "Wybierz język"
}
}
2 changes: 1 addition & 1 deletion admin/i18n/pt/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"Password": "Senha",
"Polling interval": "Intervalo de pesquisa",
"Select language": "Selecione o idioma"
}
}
2 changes: 1 addition & 1 deletion admin/i18n/ru/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"Password": "пароль",
"Polling interval": "Интервал опроса",
"Select language": "Выберите язык"
}
}
9 changes: 9 additions & 0 deletions admin/i18n/uk/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Email address": "Адреса електронної пошти",
"Enter your MELCloud email address": "Введіть адресу електронної пошти MELCloud",
"Enter your MELCloud password": "Введіть свій пароль MELCloud",
"Enter your desired polling interval (in minutes) here to query data from MELCloud": "Введіть тут бажаний інтервал опитування (у хвилинах), щоб запитувати дані з MELCloud",
"Password": "Пароль",
"Polling interval": "Інтервал опитування",
"Select language": "Оберіть мову"
}
2 changes: 1 addition & 1 deletion admin/i18n/zh-cn/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"Password": "密码",
"Polling interval": "轮询间隔",
"Select language": "选择语言"
}
}
Loading

0 comments on commit 6385bc9

Please sign in to comment.