Skip to content

Commit

Permalink
changes ci configs for main
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusgiger committed Nov 20, 2023
1 parent b5478ed commit 4ee73f9
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 76 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [main]
schedule:
- cron: '25 22 * * 3'
- cron: "25 22 * * 3"

jobs:
analyze:
Expand All @@ -32,40 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
8 changes: 4 additions & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Node.js CI

on:
push:
branches: [master]
branches: [main]
pull_request:
branches: [master]
branches: [main]

jobs:
build:
Expand All @@ -18,9 +18,9 @@ jobs:
node-version: [14, 16, 18]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Feel free to use them and submit your own decoders.<br>
## Creating a uplink decoder

- Have the payload documentation ready
- If you need some inspiration, copy an already existing one e.g. [./types/comtac/CM-1](https://github.com/akenza-io/device-type-library/blob/master/types/comtac/CM-1/uplink.js)
- If you already got a javascript decoder, you could integrate it like [./types/digitalMatter/oyster](https://github.com/akenza-io/device-type-library/blob/master/types/digitalMatter/oyster/uplink.js)
- If you need some inspiration, copy an already existing one e.g. [./types/comtac/CM-1](https://github.com/akenza-io/device-type-library/blob/main/types/comtac/CM-1/uplink.js)
- If you already got a javascript decoder, you could integrate it like [./types/digitalMatter/oyster](https://github.com/akenza-io/device-type-library/blob/main/types/digitalMatter/oyster/uplink.js)
- Adhere wherever possible to the eslint rules

## Helper function usage
Expand All @@ -47,10 +47,10 @@ Common data types can be reused by combining schemas.
"type": "object",
"allOf": [
{
"$ref": "https://raw.githubusercontent.com/akenza-io/device-type-library/master/data-models/ambiance/temperature/schema.json"
"$ref": "https://raw.githubusercontent.com/akenza-io/device-type-library/main/data-models/ambiance/temperature/schema.json"
},
{
"$ref": "https://raw.githubusercontent.com/akenza-io/device-type-library/master/data-models/common/battery/schema.json"
"$ref": "https://raw.githubusercontent.com/akenza-io/device-type-library/main/data-models/common/battery/schema.json"
},
{
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions data-models/ambiance/humidity/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/akenza-io/device-type-library/master/data-models/ambiance/humidity/schema.json",
"$id": "https://raw.githubusercontent.com/akenza-io/device-type-library/main/data-models/ambiance/humidity/schema.json",
"$defs": {
"type": "number",
"title": "Humidity",
Expand All @@ -10,4 +10,4 @@
"maximum": 100.0,
"minimum": 0.0
}
}
}
4 changes: 2 additions & 2 deletions data-models/ambiance/sound/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$defs": {
"$id": "https://raw.githubusercontent.com/akenza-io/device-type-library/master/data-models/ambiance/sound/schema.json",
"$id": "https://raw.githubusercontent.com/akenza-io/device-type-library/main/data-models/ambiance/sound/schema.json",
"type": "number",
"title": "Sound Average",
"description": "Average value of the sound pressure level in decibel.",
Expand All @@ -12,4 +12,4 @@
"minimum": 20.0,
"exclusiveMinimum": 19.9
}
}
}
24 changes: 12 additions & 12 deletions data-models/ambiance/temperature/flat/schema.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/akenza-io/device-type-library/master/data-models/ambiance/temperature/flat/schema.json",
"type": "number",
"title": "Temperature Celcius",
"description": "The temperature in degree Celsius.",
"unit": "°C",
"multipleOf": 0.1,
"maximum": 100.0,
"exclusiveMaximum": 100.1,
"minimum": -100.0,
"exclusiveMinimum": -100.1
}
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/akenza-io/device-type-library/main/data-models/ambiance/temperature/flat/schema.json",
"type": "number",
"title": "Temperature Celcius",
"description": "The temperature in degree Celsius.",
"unit": "°C",
"multipleOf": 0.1,
"maximum": 100.0,
"exclusiveMaximum": 100.1,
"minimum": -100.0,
"exclusiveMinimum": -100.1
}
4 changes: 2 additions & 2 deletions data-models/common/battery-level/schema.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/akenza-io/device-type-library/master/data-models/common/battery-level/schema.json",
"$id": "https://raw.githubusercontent.com/akenza-io/device-type-library/main/data-models/common/battery-level/schema.json",
"$defs": {
"batteryLevel" : {
"batteryLevel": {
"type": "number",
"title": "Battery Level",
"description": "The battery level in percent.",
Expand Down
79 changes: 62 additions & 17 deletions lib/meta.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/akenza-io/device-type-library/tree/master/types/meta.schema.json",
"$id": "https://github.com/akenza-io/device-type-library/tree/main/types/meta.schema.json",
"type": "object",
"title": "meta.json schema",
"description": "Describes the format of the meta.json",
Expand All @@ -13,8 +13,16 @@
"description": "Indoor LoRaWAN® device for measuring the indoor environment and desk occupancy",
"author": "Akenza AG",
"firmwareVersion": "V1.0.0",
"availableSensors": ["Occupancy", "Temperature", "Humidity", "Light"],
"outputTopics": ["default", "occupancy"],
"availableSensors": [
"Occupancy",
"Temperature",
"Humidity",
"Light"
],
"outputTopics": [
"default",
"occupancy"
],
"encoding": "HEX",
"connectivity": "LORA"
}
Expand All @@ -33,26 +41,34 @@
"type": "string",
"title": "The name schema",
"description": "An explanation about the purpose of this instance.",
"examples": ["Elsys - ERS Desk"]
"examples": [
"Elsys - ERS Desk"
]
},
"version": {
"type": "string",
"title": "The version schema",
"description": "An explanation about the purpose of this instance.",
"pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+[0-9A-Za-z-]+)?$",
"examples": ["1.0.0"]
"examples": [
"1.0.0"
]
},
"manufacturer": {
"type": "string",
"title": "The manufacturer schema",
"description": "An explanation about the purpose of this instance.",
"examples": ["Elsys"]
"examples": [
"Elsys"
]
},
"url": {
"type": "string",
"title": "The url schema",
"description": "An explanation about the purpose of this instance.",
"examples": ["https://www.elsys.se/shop/product/ers-desk/"]
"examples": [
"https://www.elsys.se/shop/product/ers-desk/"
]
},
"description": {
"type": "string",
Expand All @@ -66,20 +82,29 @@
"type": "string",
"title": "The author schema",
"description": "An explanation about the purpose of this instance.",
"examples": ["Akenza AG"]
"examples": [
"Akenza AG"
]
},
"firmwareVersion": {
"type": "string",
"title": "The firmwareVersion schema",
"description": "An explanation about the purpose of this instance.",
"pattern": "^V([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+[0-9A-Za-z-]+)?$",
"examples": ["V1.0.0"]
"examples": [
"V1.0.0"
]
},
"availableSensors": {
"type": "array",
"title": "The availableSensors schema",
"description": "An explanation about the purpose of this instance.",
"examples": [["Occupancy", "Temperature"]],
"examples": [
[
"Occupancy",
"Temperature"
]
],
"uniqueItems": true,
"items": {
"type": "string"
Expand All @@ -89,8 +114,15 @@
"type": "array",
"title": "The outputTopics schema",
"description": "An explanation about the purpose of this instance.",
"default": ["default"],
"examples": [["default", "occupancy"]],
"default": [
"default"
],
"examples": [
[
"default",
"occupancy"
]
],
"uniqueItems": true,
"items": {
"type": "string"
Expand All @@ -100,15 +132,28 @@
"type": "string",
"title": "The encoding schema",
"description": "An explanation about the purpose of this instance.",
"enum": ["HEX", "JSON"],
"examples": ["HEX"]
"enum": [
"HEX",
"JSON"
],
"examples": [
"HEX"
]
},
"connectivity": {
"type": "string",
"title": "The connectivity schema",
"description": "An explanation about the purpose of this instance.",
"enum": ["LORA", "Sigfox", "MQTT", "HTTP", "NB-IOT"],
"examples": ["LORA"]
"enum": [
"LORA",
"Sigfox",
"MQTT",
"HTTP",
"NB-IOT"
],
"examples": [
"LORA"
]
}
}
}
}
13 changes: 9 additions & 4 deletions types/milesight/EM320-TILT/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
"name": "EM320-TILT",
"version": "1.0.0",
"manufacturer": "Milesight",
"url": "https://github.com/Milesight-IoT/SensorDecoders/tree/master/EM320_Series/EM320-TILT",
"url": "https://github.com/Milesight-IoT/SensorDecoders/tree/main/EM320_Series/EM320-TILT",
"description": "EM320-TILT is a LoRaWAN® tilt sensor mainly for angle measurement and asset movement detection. With a compact size and 3-axis accelerometer, EM310-TILT can be installed to the objects easily to measure its X, Y, Z tilt angles. It can also detect the movement based on angle changes and send threshold alarms",
"author": "Akenza AG",
"firmwareVersion": "V1.0.0",
"loraDeviceClass": "A",
"availableSensors": ["Tilt"],
"outputTopics": ["default", "lifecycle"],
"availableSensors": [
"Tilt"
],
"outputTopics": [
"default",
"lifecycle"
],
"encoding": "HEX",
"connectivity": "LORA"
}
}

0 comments on commit 4ee73f9

Please sign in to comment.