qmd/.github/workflows/ci.yml
Jörg Thalheim 8c4b4b335d sync stale bun.lock, guard against future lockfile drift
bun.lock still resolved better-sqlite3 to 11.x after package.json was
bumped to ^12.4.5 in v2.0.0. This breaks sandboxed builds (e.g. Nix
with bun2nix) where network access is unavailable to resolve the
mismatch.

CI and the publish workflow now use --frozen-lockfile so drift is caught
immediately. The release script also validates lockfile consistency
before tagging.

Closes #386
2026-03-13 13:34:17 +01:00

73 lines
1.7 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test-node:
name: Node ${{ matrix.node-version }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
node-version: ["22", "23"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install SQLite (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
- name: Install SQLite (macOS)
if: runner.os == 'macOS'
run: brew install sqlite
- run: npm install
- name: Tests
run: npx vitest run --reporter=verbose --testTimeout 60000 test/
env:
CI: true
test-bun:
name: Bun (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install SQLite (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
- name: Install SQLite (macOS)
if: runner.os == 'macOS'
run: brew install sqlite
- name: Verify lockfile is up-to-date
run: bun install --frozen-lockfile
- name: Tests
run: bun test --timeout 60000 --preload ./src/test-preload.ts test/
env:
CI: true
DYLD_LIBRARY_PATH: /opt/homebrew/opt/sqlite/lib
LD_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu