Skip to content

ci: add Node version matrix to build-and-deploy Node.js workflow#387

Merged
adsharma merged 4 commits into
LadybugDB:mainfrom
antonymarion:ci/node-matrix-build-and-deploy
Apr 21, 2026
Merged

ci: add Node version matrix to build-and-deploy Node.js workflow#387
adsharma merged 4 commits into
LadybugDB:mainfrom
antonymarion:ci/node-matrix-build-and-deploy

Conversation

@antonymarion

@antonymarion antonymarion commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Context

This PR moves expanded Node.js version coverage to the canonical build/deploy workflow (instead of ladybug-nodejs), following review feedback on the now-closed PR LadybugDB/ladybug-nodejs#9 (comments from @adsharma).

Changes

  • Added a Node version matrix to build-nodejs in build-and-deploy.yml:
    • 22 (default release path)
    • 20 (additional validation)
    • 24 (non-blocking canary via continue-on-error)
  • Passed nodeVersion and artifactSuffix to nodejs-workflow.yml.
  • Added actions/setup-node@v4 in nodejs-workflow.yml with npm cache enabled.
  • Added artifact suffixes (-node20, -node24) to avoid collisions across matrix runs.

Why

  • Apply Node version coverage in the right place (the main pipeline), while preserving compatibility with the current release/deploy flow.

Reference

  • Related closed PR: LadybugDB/ladybug-nodejs#9

@adsharma

Copy link
Copy Markdown
Contributor

Comment thread .github/workflows/build-and-deploy.yml Outdated
@adsharma

Copy link
Copy Markdown
Contributor

@antonymarion could you look into the CI failures? Would love to get this one in before the next release.

Add Node.js version matrix coverage to build-and-deploy while keeping reusable workflow matrix metadata intact and removing the invalid continue-on-error expression from the reusable workflow call.

Made-with: Cursor
@antonymarion antonymarion force-pushed the ci/node-matrix-build-and-deploy branch from c378e87 to d29b234 Compare April 21, 2026 16:10
actions/setup-node resolves cache-dependency-path during setup. The lockfile lives in tools/nodejs_api, which is a submodule path and was not present before submodule init, causing cache path resolution failures in CI.

Run submodule initialization first so setup-node can resolve tools/nodejs_api/package-lock.json and restore/save npm cache correctly.

Made-with: Cursor
@adsharma

Copy link
Copy Markdown
Contributor

Remove setup-node cache configuration because the configured lockfile path can be unresolved in this workflow context, causing setup-node to fail before dependency installation.

Made-with: Cursor
@antonymarion

Copy link
Copy Markdown
Contributor Author

CI run: https://github.com/LadybugDB/ladybug/actions/runs/24737230545

@adsharma you can please relaunch with the last commit on the ladybug original repo.

Mine (fork) is failing since link to precompiled liblbug is missing but should be ok on your side
https://github.com/antonymarion/ladybug/actions/runs/24738233445/job/72371254689

@antonymarion antonymarion requested a review from adsharma April 21, 2026 18:24
@antonymarion antonymarion marked this pull request as ready for review April 21, 2026 18:24
@adsharma

Copy link
Copy Markdown
Contributor

@adsharma

Copy link
Copy Markdown
Contributor

Succeeded! Please cherry pick

d20cf91 and we should be good to go.

@adsharma adsharma merged commit d64a5a0 into LadybugDB:main Apr 21, 2026
4 checks passed
@adsharma

Copy link
Copy Markdown
Contributor

Thank you!

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.

2 participants