Skip to content

Update test-and-release workflow to use Node.js 22 for non-matrix operations#1285

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/update-workflow-to-node-22
Draft

Update test-and-release workflow to use Node.js 22 for non-matrix operations#1285
Copilot wants to merge 3 commits intomasterfrom
copilot/update-workflow-to-node-22

Conversation

Copy link
Contributor

Copilot AI commented Jan 11, 2026

PR Checklist:

  • Provide a meaningful description to this PR or mention which issues this fixes.
  • Ensure the project builds with npm run build
  • Add tests for your change. This includes negative tests (i.e. inputs that need to fail) as well as baseline tests (i.e. how should the directory structure look like?).
  • Run the test suite with npm test
  • If there are baseline changes, review them and make a separate commit for them with the comment "accept baselines" if they are desired changes
  • If you added a required option, also add it to the template creation (.github/create_templates.ts)
  • Add a detailed migration description to docs/updates explaining what the user needs to do when manually updating an existing project
  • Add your changes to CHANGELOG.md (referencing the migration description and this PR or the issue you fixed)

Description:

The generated test-and-release workflow was using the minimum supported Node.js version for check-and-lint and deploy operations. This meant adapters supporting Node.js 20 would run these operations on Node.js 20 rather than the current recommended version.

Changes

  • src/lib/constants.ts: Updated RECOMMENDED_NODE_VERSION_FALLBACK from "20" to "22"
  • templates/_github/workflows/test-and-release.yml.ts: Changed ltsNodeVersion to always use RECOMMENDED_NODE_VERSION_FALLBACK instead of minNodeVersion
  • test/create-adapter.test.ts: Updated test expectations to reflect LTS version is now independent of minimum Node version
  • Baselines: Regenerated all baseline workflows

Behavior

# Before: adapter with Node.js 20 minimum
check-and-lint:
  node-version: '20.x'  # Used minimum version
adapter-tests:
  matrix:
    node-version: [20.x, 22.x, 24.x]

# After: adapter with Node.js 20 minimum  
check-and-lint:
  node-version: '22.x'  # Uses recommended version
adapter-tests:
  matrix:
    node-version: [20.x, 22.x, 24.x]  # Still tests all supported versions

Test matrices remain unchanged - they continue testing all Node.js versions >= minimum supported version. Only check-and-lint and deploy jobs now consistently use Node.js 22.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.iobroker.net
    • Triggering command: /usr/local/bin/node node iobroker.js add template --enabled false npm dules/.bin/sh --dry-run --json bin/node node pm install --loglevel node_modules/.bi-Wl,-soname=diskusage.node --no-audit --helper-status mcli/run-script/iobroker.template e (dns block)
    • Triggering command: /usr/local/bin/node node iobroker.js add template --enabled false npm e_modules/.bin/sh --dry-run --json tnet/tools/sh node /usr�� spaces with new lines; test:package k/create-adapter/node_modules/.bin/python3 tsconfig.check.jnpm --dry-run n/node sh (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>test-and-release workflow should use node.js 22</issue_title>
<issue_description>The standard test-and-release workflow should start to use node.js 22 for operations other then those controlled by test-matrix. Currently the workflow still uses node.js 20 in those cases.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Jan 11, 2026
Copilot AI and others added 2 commits January 11, 2026 11:54
Co-authored-by: Apollon77 <11976694+Apollon77@users.noreply.github.com>
Co-authored-by: Apollon77 <11976694+Apollon77@users.noreply.github.com>
Copilot AI changed the title [WIP] Update test-and-release workflow to use Node.js 22 Update test-and-release workflow to use Node.js 22 for non-matrix operations Jan 11, 2026
Copilot AI requested a review from Apollon77 January 11, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test-and-release workflow should use node.js 22

2 participants