Skip to content

Commit

Permalink
Tag processor poc (#94)
Browse files Browse the repository at this point in the history
* savegame

* Savegame

* all tests passing

* fix: readme

* fix: go mod tidy

* fix: doker build

* fix: all tests

* fix: coderabbit

* fix: refactor for better readability

* savegame

* fix: tests are running (but not working)

* 4 test passing

* fix: all tests passing

* feat: added outlook with umh.getTagFromFullTagName

* feat: renamed folder to virtualPath

* docs

* defiend targetstate for returning multiple msgs

* defined target state

* mroe future outlook towards returning multiple messages

* fix: adjusted test cases

* README

* fix tests

* test still passing

* all test passing

* feat: multiple message returns

* upcomign statement

* fixed return type

* removed debug

* fix: updated README

* added ci/cd

* fix: removed debiug

* removed debug

* removed debug

* fix: opc ua error (potentially)

* added benchmark

* added option for json in payload

* adjsuted README and test cases

* all tests passing

* feat: better readability of the code and structure in tag browser

* fix readme

* final stuff

* fix: Docker build

* fix: coderabbit

* fix: attr
  • Loading branch information
JeremyTheocharis authored Dec 13, 2024
1 parent c9a225f commit 99c5e7d
Show file tree
Hide file tree
Showing 18 changed files with 3,621 additions and 15 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/nodered-js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2023 UMH Systems GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
name: main

on:
push:
branches:
- '**'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
GO_VERSION: '1.22.*'

concurrency:
group: nodered-js-test
cancel-in-progress: true

jobs:
go-test-nodered-js:
runs-on:
group: arc-runners
permissions:
packages: write
contents: read
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/setup-go
with:
go_version: ${{ env.GO_VERSION }}
- name: Install Ginkgo
run: go install github.com/onsi/ginkgo/v2/[email protected]
- name: Test
run: TEST_NODERED_JS=1 make test
49 changes: 49 additions & 0 deletions .github/workflows/tag-processor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2023 UMH Systems GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
name: main

on:
push:
branches:
- '**'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
GO_VERSION: '1.22.*'

concurrency:
group: tag-processor-test
cancel-in-progress: true

jobs:
go-test-tag-processor:
runs-on:
group: arc-runners
permissions:
packages: write
contents: read
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/setup-go
with:
go_version: ${{ env.GO_VERSION }}
- name: Install Ginkgo
run: go install github.com/onsi/ginkgo/v2/[email protected]
- name: Test
run: TEST_TAG_PROCESSOR=1 make test
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ COPY ./cmd ./cmd
COPY ./opcua_plugin ./opcua_plugin
COPY ./s7comm_plugin ./s7comm_plugin
COPY ./modbus_plugin ./modbus_plugin
COPY ./nodered_js_plugin ./nodered_js_plugin
COPY ./tag_processor_plugin ./tag_processor_plugin
COPY ./sensorconnect_plugin ./sensorconnect_plugin

ENV CGO_ENABLED=0
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@ test-sensorconnect: test
test-opc-plc:
@TEST_OPCUA_SIMULATOR=true ginkgo -r --output-interceptor-mode=none --github-output -vv -trace --randomize-all --cover --coverprofile=cover.profile --repeat=2 ./opcua_plugin/...

.PHONY: clean target test update-benthos test-opc-plc
# Test the tag processor with a local OPC UA server
test-tag-processor: target
./tmp/bin/benthos -c ./config/tag-processor-test.yaml

.PHONY: clean target test update-benthos test-opc-plc test-tag-processor
Loading

0 comments on commit 99c5e7d

Please sign in to comment.