Repository navigation
ci: test better-sqlite3 on a matrix of os/node/version - #11688
pkuczynski wants to merge 7 commits into
Conversation
|
Warning Rate limit exceeded@pkuczynski has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 48 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
WalkthroughAdds a composite GitHub Action for building artifacts, introduces a dedicated matrix workflow to test better-sqlite3 across OS/Node/version combinations, removes better-sqlite3 jobs from existing Linux/Windows workflows, and tightens .gitignore patterns to root-scoped entries for build, coverage, node_modules, and .nyc_output. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub Actions
participant Build as Composite Build Action
participant Artifact as Artifact Store
participant Test as better-sqlite3 Matrix Tests
Dev->>GH: Open Pull Request
activate GH
GH->>Build: Run build (setup-node → npm ci → compile)
Build->>Artifact: Upload build/ (retention: 1 day)
GH-->>GH: Legacy linux/windows workflows run (without better-sqlite3)
GH->>Test: Start matrix (OS × Node × b-sqlite3 with excludes)
Test->>Artifact: Download build/
Test->>Test: npm ci → install better-sqlite3@version → copy ormconfig.json
Test->>Test: npx nyc npm run test:ci
deactivate GH
note over Test,GH: Coveralls step available but commented out
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.github/actions/build/action.yml(1 hunks).github/workflows/test-better-sqlite3.yml(1 hunks).github/workflows/tests-linux.yml(0 hunks).github/workflows/tests-windows.yml(0 hunks).gitignore(1 hunks)
💤 Files with no reviewable changes (2)
- .github/workflows/tests-linux.yml
- .github/workflows/tests-windows.yml
🧰 Additional context used
🪛 GitHub Actions: test-better-sqlite3
.github/actions/build/action.yml
[error] 24-24: GitHub Action YAML parse error: While scanning a simple key, could not find expected ':'.
🪛 actionlint (1.7.7)
.github/workflows/test-better-sqlite3.yml
15-15: could not parse action metadata in "/home/jailuser/git/.github/actions/build": yaml: line 23: could not find expected ':'
(action)
27-27: value ["8", "9", "10"] in "exclude" does not match in matrix "version" combinations. possible values are "8", "9", "10", "11", "12"
(matrix)
29-29: value ["8", "9", "10", "11"] in "exclude" does not match in matrix "version" combinations. possible values are "8", "9", "10", "11", "12"
(matrix)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: tests-windows / sqlite
- GitHub Check: tests-windows / sqljs
- GitHub Check: Analyze (javascript-typescript)
| exclude: | ||
| - node: 22 | ||
| version: [8, 9, 10] | ||
| - node: 24 | ||
| version: [8, 9, 10, 11] |
There was a problem hiding this comment.
Fix matrix excludes: arrays are invalid here
exclude entries must spell out full combinations—GitHub Actions won’t accept array values. The current config leaves the bad combos in play. Please expand them into discrete entries.
version: [8, 9, 10, 11, 12]
exclude:
- - node: 22
- version: [8, 9, 10]
- - node: 24
- version: [8, 9, 10, 11]
+ - node: 22
+ version: 8
+ - node: 22
+ version: 9
+ - node: 22
+ version: 10
+ - node: 24
+ version: 8
+ - node: 24
+ version: 9
+ - node: 24
+ version: 10
+ - node: 24
+ version: 11📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| exclude: | |
| - node: 22 | |
| version: [8, 9, 10] | |
| - node: 24 | |
| version: [8, 9, 10, 11] | |
| version: [8, 9, 10, 11, 12] | |
| exclude: | |
| - node: 22 | |
| version: 8 | |
| - node: 22 | |
| version: 9 | |
| - node: 22 | |
| version: 10 | |
| - node: 24 | |
| version: 8 | |
| - node: 24 | |
| version: 9 | |
| - node: 24 | |
| version: 10 | |
| - node: 24 | |
| version: 11 |
🧰 Tools
🪛 actionlint (1.7.7)
27-27: value ["8", "9", "10"] in "exclude" does not match in matrix "version" combinations. possible values are "8", "9", "10", "11", "12"
(matrix)
29-29: value ["8", "9", "10", "11"] in "exclude" does not match in matrix "version" combinations. possible values are "8", "9", "10", "11", "12"
(matrix)
🤖 Prompt for AI Agents
.github/workflows/test-better-sqlite3.yml around lines 25 to 29: the matrix
exclude block uses arrays for version (e.g. version: [8, 9, 10]) which GitHub
Actions does not accept; replace each array-based exclude with separate exclude
entries that enumerate each node/version combination individually (e.g. one
exclude object per version number for node 22, and likewise one per version
number for node 24) so all invalid combinations are explicitly spelled out.
|
|
||
| - run: npm install -D better-sqlite3@${{ matrix.version }} | ||
|
|
||
| - run: cp .github/workflows/test/better-sqlite3.ormconfig.json ormconfig.json |
There was a problem hiding this comment.
Make the config copy step cross-platform
cp fails under the default Windows shell (pwsh). Either switch the step to bash or use a PowerShell copy, otherwise every Windows job will break.
- - run: cp .github/workflows/test/better-sqlite3.ormconfig.json ormconfig.json
+ - run: cp .github/workflows/test/better-sqlite3.ormconfig.json ormconfig.json
+ shell: bash📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - run: cp .github/workflows/test/better-sqlite3.ormconfig.json ormconfig.json | |
| - run: cp .github/workflows/test/better-sqlite3.ormconfig.json ormconfig.json | |
| shell: bash |
🤖 Prompt for AI Agents
In .github/workflows/test-better-sqlite3.yml around line 50, the step uses the
Unix-specific `cp` command which fails under the default Windows shell (pwsh);
update the step to be cross-platform by either setting the step to run in bash
(add `shell: bash` and keep `cp ...`) or replace the command with a
PowerShell-safe copy (e.g., `Copy-Item` via pwsh) so Windows runners won’t
break.
| /build/ | ||
| /coverage/ | ||
| /node_modules/ | ||
| /.nyc_output/ |
There was a problem hiding this comment.
Restore global ignores for build outputs and node_modules
Scoping these ignores to the repo root will stop Git from ignoring node_modules, build, coverage, etc. in nested example/fixture folders. This repo has multiple subprojects/tests that can spawn those directories, so we’d risk accidentally committing huge dependency trees. Please revert to the global patterns.
-/build/
-/coverage/
-/node_modules/
-/.nyc_output/
+build/
+coverage/
+node_modules/
+.nyc_output/📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /build/ | |
| /coverage/ | |
| /node_modules/ | |
| /.nyc_output/ | |
| build/ | |
| coverage/ | |
| node_modules/ | |
| .nyc_output/ |
🤖 Prompt for AI Agents
In .gitignore around lines 6 to 9, the entries are rooted (start with /) which
only ignores those paths at the repo root; change them to global patterns by
removing the leading slashes so nested example/fixture folders' build/,
coverage/, node_modules/, and .nyc_output/ directories are ignored (e.g., use
node_modules/ , build/ , coverage/ , .nyc_output/).
commit: |
|
Following conversation in #11683 (comment), such proposal is not welcome. |
Description of change
During discussion in #11683 it become quite clear that developers only test better-sqlite3 on the version which is listed in
devDependencies. This however might or might not work depending on the used node version. To ensure everything works across different os, node and library versions, I would suggest testingbetter-sqlite3in a matrix setup.Pull-Request Checklist
masterbranchFixes #00000Summary by CodeRabbit
Chores
Tests