Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
49ab878
Add github workflow
pledou Jan 15, 2026
27e0a4d
Refactor build and releases
pledou Jan 15, 2026
f7faba9
Fix workflow to run build step after tests in Node.js CI
pledou Jan 15, 2026
5dd8f61
Add npm ci step to Node.js CI workflow for clean installation of depe…
pledou Jan 15, 2026
d6874d7
Configure e2e tests to include services start & stop
pledou Jan 16, 2026
13f1004
Add action to trigger message from master device in E2E test
pledou Jan 16, 2026
240dcd8
fix e2e test ending
pledou Jan 16, 2026
627be85
Refactor E2E test service startup and shutdown procedures for improve…
pledou Jan 16, 2026
cc3b8be
Fix E2E test to publish correct value from master device
pledou Jan 16, 2026
ea535b9
Test if we have a timing issue by initializing the cache if necessary
pledou Jan 16, 2026
ed8b222
Refactor cache initialization for read-write transactions in master_c…
pledou Jan 16, 2026
029e785
Refactor buffer initialization in setRequest function to ensure prope…
pledou Jan 16, 2026
28fd7df
revert changes and disable e2e test on github, because we encounter t…
pledou Jan 16, 2026
217a73f
fix revert
pledou Jan 16, 2026
0933195
Enhance GitHub workflow to set NODE_ENV for test environment and impr…
pledou Jan 16, 2026
332348e
Add default configuration for test environment and update config load…
pledou Jan 16, 2026
51c0446
Update test specification path to target unit tests
pledou Jan 16, 2026
903b978
Refactor build_pkg.js to use dynamic imports for execa and cpy
pledou Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

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

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- name: Run tests
run: npm run test:unit && npm run test:integration
env:
NODE_ENV: test
- run: npm run build --if-present

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

on:
push:
tags:
- 'v*'

jobs:
build-and-release:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

- name: Build release
run: npm run build

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false

- name: Upload Windows executable
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Releases/modbussimulator-win.exe
asset_name: modbussimulator-win.exe
asset_content_type: application/octet-stream

- name: Upload Linux executable
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Releases/modbussimulator-linux
asset_name: modbussimulator-linux
asset_content_type: application/octet-stream

- name: Upload schema files
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Releases
asset_name: schemas.tar.gz
asset_content_type: application/gzip
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/.e2e
/node_modules
/package-lock.json
/Test_End2End
/todo
/Releases
build-output.log
2 changes: 1 addition & 1 deletion .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extensions": ["ts"],
"spec": ["test/**/*.test.ts"],
"spec": ["test/unit/**/*.test.ts"],
"timeout": 5000,
"color": true,
"loader": "ts-node/esm",
Expand Down
Loading