add test if install works for minimal node version (#4197)

and update minimal node version to `v22.22.2`

Background:

The latest release requires node `v22.22.2` because this version is
required by a dev dependency, see
https://forum.magicmirror.builders/post/131522

I added a new test for this (I didn't want to add another version to the
test matrix ...) so that we see needed minimum node version upgrades
earlier on develop (and not after release).
This commit is contained in:
Karsten Hassel
2026-07-06 23:06:06 +02:00
committed by GitHub
parent cdab7a7ea3
commit 0bb9b5ff42
3 changed files with 21 additions and 2 deletions
+19
View File
@@ -34,6 +34,25 @@ jobs:
- name: "Run linter tests"
run: |
node --run test:lint
min-node-version-install:
runs-on: ubuntu-slim
timeout-minutes: 15
steps:
- name: "Checkout code"
uses: actions/checkout@v7
- name: "Get minimum node version"
id: get-version
run: |
NODE_VERSION="$(cat package.json | sed -rn 's|.*"node": ">=([0-9]+\.[0-9]+\.[0-9]+).*|\1|p')"
echo "Minimal node version is $NODE_VERSION"
echo "version=$NODE_VERSION" >> $GITHUB_OUTPUT
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ steps.get-version.outputs.version }}
- name: "Install dependencies"
run: |
node --run install-mm:dev
test:
runs-on: ubuntu-24.04
timeout-minutes: 30
+1 -1
View File
@@ -58,7 +58,7 @@
"vitest": "^4.1.9"
},
"engines": {
"node": ">=22.21.1 <23 || >=24"
"node": ">=22.22.2 <23 || >=24"
},
"optionalDependencies": {
"electron": "^43.0.0"
+1 -1
View File
@@ -132,6 +132,6 @@
"electron": "^43.0.0"
},
"engines": {
"node": ">=22.21.1 <23 || >=24"
"node": ">=22.22.2 <23 || >=24"
}
}