Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/github_actions/actions/checkout-4
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfonso committed Nov 2, 2024
2 parents f5d21c6 + 4cd8749 commit 31e5b91
Show file tree
Hide file tree
Showing 50 changed files with 7,364 additions and 2,198 deletions.
46 changes: 46 additions & 0 deletions .create-adapter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"plugins": [
"iobroker",
"license",
"manual-review"
],
"addPlaceholder": false,
"ioPackageNoPrerelease": false,
"replay": "/home/achim/development/iobroker/ioBroker.rpi2/.releaseconfig.json",
"adapterName": "rpi2",
"title": "RPI Monitor and GPIO",
"description": "Monitor data from a Raspberry PI and interact with GPIOs.",
"keywords": [
"raspberry",
"monitoring",
"gpio",
"raspian"
],
"expert": "yes",
"features": [
"adapter"
],
"adminFeatures": [],
"type": "hardware",
"startMode": "daemon",
"connectionType": "local",
"dataSource": "push",
"connectionIndicator": "no",
"language": "JavaScript",
"nodeVersion": "18",
"adminUi": "json",
"tools": [
"ESLint",
"type checking"
],
"releaseScript": "yes",
"indentation": "Space (4)",
"quotes": "single",
"authorName": "Garfonso",
"authorGithub": "iobroker-community-adapters",
"authorEmail": "garfonso@mobo.info",
"gitRemoteProtocol": "SSH",
"license": "MIT License",
"dependabot": "yes",
"creatorVersion": "2.6.5"
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/.eslintrc.js
admin/words.js
47 changes: 47 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"root": true,
"env": {
"es6": true,
"node": true,
"mocha": true
},
"extends": [
"eslint:recommended"
],
"plugins": [],
"rules": {
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"no-console": "off",
"no-unused-vars": [
"error",
{
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_"
}
],
"no-var": "error",
"no-trailing-spaces": "error",
"prefer-const": "error",
"quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"semi": [
"error",
"always"
]
},
"parserOptions": {
"ecmaVersion": "latest"
}
}
10 changes: 7 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
interval: monthly
time: "04:00"
timezone: Europe/Berlin
open-pull-requests-limit: 15
assignees:
- Garfonso
versioning-strategy: increase

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
interval: monthly
time: "04:00"
timezone: Europe/Berlin
open-pull-requests-limit: 15
open-pull-requests-limit: 5
assignees:
- Garfonso
78 changes: 0 additions & 78 deletions .github/stale.yml

This file was deleted.

101 changes: 101 additions & 0 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Test and Release

# Run this job on all pushes and pull requests
# as well as tags with a semantic version
on:
push:
branches:
- "master"
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

steps:
- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libgpiod-dev
version: 1.0 #string to identify the cache.
- uses: ioBroker/testing-action-check@v1
with:
node-version: '20.x'
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'
lint: true

# Runs adapter tests on all supported node versions and OSes
adapter-tests:
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]

steps:
- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libgpiod-dev
version: 1.0 #string to identify the cache.
- uses: ioBroker/testing-action-adapter@v1
with:
node-version: ${{ matrix.node-version }}
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')
runs-on: ubuntu-latest

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

steps:
- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libgpiod-dev
version: 1.0 #string to identify the cache.
- uses: ioBroker/testing-action-deploy@v1
with:
node-version: '20.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-rpi2"
# sentry-version-prefix: "iobroker.rpi2"
# # If your sentry project is linked to a GitHub repository, you can enable the following option
# # sentry-github-integration: true
20 changes: 15 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# No dot-directories except github/vscode
.*/
!.vscode/
!.github/

*.code-workspace
node_modules
.idea
nbproject

# npm package files
iobroker.*.tgz

Thumbs.db

# i18n intermediate files
admin/i18n/flat.txt
admin/i18n/*/flat.txt
iob_npm.done
/nbproject
package-lock.json
admin/i18n/*/flat.txt
11 changes: 0 additions & 11 deletions .npmignore

This file was deleted.

5 changes: 5 additions & 0 deletions .releaseconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": ["iobroker", "license", "manual-review"],
"addPlaceholder": false,
"ioPackageNoPrerelease": false
}
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
Loading

0 comments on commit 31e5b91

Please sign in to comment.