ci: switch from bun test to vitest on Node.js
All test files now use vitest + better-sqlite3 imports. bun test can't load the better-sqlite3 native addon (symbol error on Linux, segfault on macOS). Run vitest on Node 22/23.
This commit is contained in:
parent
dc64166a2a
commit
c685f7ac71
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
@ -13,14 +13,14 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
bun-version: ["latest", "1.1.0"]
|
||||
node-version: ["22", "23"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
bun-version: ${{ matrix.bun-version }}
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install SQLite (Ubuntu)
|
||||
if: runner.os == 'Linux'
|
||||
@ -30,6 +30,17 @@ jobs:
|
||||
if: runner.os == 'macOS'
|
||||
run: brew install sqlite
|
||||
|
||||
- run: bun install
|
||||
- run: npm install
|
||||
|
||||
- run: bun test
|
||||
- name: Unit tests
|
||||
run: npx vitest run --reporter=verbose src/*.test.ts
|
||||
|
||||
- name: Model tests
|
||||
run: npx vitest run --reporter=verbose src/models/*.test.ts
|
||||
env:
|
||||
CI: true
|
||||
|
||||
- name: Integration tests
|
||||
run: npx vitest run --reporter=verbose src/integration/*.test.ts
|
||||
env:
|
||||
CI: true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user