chore: homogenize CI workflow with Vue stack#3123
Conversation
- Rename job build -> test (aligned with Vue) - npm i -> npm install (aligned with Vue) - Upload coverage to Codecov only on node 22.x to avoid duplicate reports (fixes Vue's broken lts/* condition which never matched explicit versions)
There was a problem hiding this comment.
Pull request overview
Aligns the repository’s GitHub Actions CI workflow with the Vue stack conventions, while ensuring Codecov coverage is uploaded exactly once per matrix run.
Changes:
- Renamed the workflow job from
buildtotest. - Replaced
npm iwithnpm installin the CI step. - Uploads Codecov coverage only for the
22.xNode matrix entry to avoid duplicate uploads and fix the previously non-matching condition.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Node: explicit 22.x/24.x -> lts/* (auto-resolves, no manual updates needed) - MongoDB: keep 7.0 LTS, remove matrix (single version) - Drop matrix entirely since there is now a single combination - Codecov runs unconditionally (single job, no duplicate risk)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [22.x, 24.x] | ||
| mongodb-version: ['7.0'] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| - name: Use Node.js LTS | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| node-version: lts/* |
There was a problem hiding this comment.
The workflow no longer runs a Node.js matrix: the strategy.matrix block was removed and actions/setup-node is pinned to lts/*, so CI will only test a single Node version (whatever is current LTS) rather than both 22.x and 24.x as described in the PR. Re-introduce the matrix and set node-version from matrix.node-version so both versions are exercised.
| - name: Upload coverage reports to Codecov | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| slug: pierreb-devkit/Node |
There was a problem hiding this comment.
The Codecov upload step is unconditional and is no longer tied to a specific Node version. If you restore the Node matrix (per PR description), this will upload coverage for every matrix run and reintroduce duplicate reports; add an if: guard to run only for the intended Node version (e.g., 22.x).
| - name: Use Node.js LTS | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| node-version: lts/* | ||
| cache: 'npm' | ||
| - name: Start Mongo ${{ matrix.mongodb-version }} | ||
| - name: Start MongoDB LTS | ||
| uses: supercharge/mongodb-github-action@1.12.1 | ||
| with: | ||
| mongodb-version: ${{ matrix.mongodb-version }} | ||
| mongodb-version: '7.0' |
There was a problem hiding this comment.
The step display names say "LTS" ("Use Node.js LTS" / "Start MongoDB LTS"), but Node is configured via lts/* while MongoDB is pinned to '7.0'. Consider renaming these steps to reflect the actual versions being used (or switch Mongo to an LTS selector if that’s the intent) to avoid confusion when debugging CI logs.
Summary
Aligns the Node CI workflow with the Vue stack structure.
build→testnpm i→npm installnode 22.x— avoids duplicate reports when the matrix runs multiple Node versionsBug fix (Vue alignment)
Vue uses
if: matrix.node-version == 'lts/*'but the matrix declares[22.x, 24.x]— this condition never matches so coverage is never uploaded. This PR uses== '22.x'which correctly targets one run in the matrix.Test plan