Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish to JSR

on:
push:
tags:
- "v*"

jobs:
publish:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write # Required for JSR provenance

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- name: Verify version matches tag
run: |
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
PACKAGE_VERSION=$(deno eval "const c = JSON.parse(await Deno.readTextFile('deno.jsonc').then(t => t.replace(/\/\/.*/g, ''))); console.log(c.version)")
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
echo "❌ Tag version ($TAG_VERSION) does not match package version ($PACKAGE_VERSION)"
exit 1
fi
echo "✅ Version $TAG_VERSION matches"

- name: Clone Drizzle shared test suite
run: make clone-repo

- name: Run tests
run: deno task test

- name: Show lockfile changes (if any)
run: git diff deno.lock || true

- name: Restore lockfile (tests may modify it due to Deno version differences)
run: git checkout deno.lock

- name: Publish to JSR
run: deno publish
88 changes: 88 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- name: Check formatting
run: deno fmt --check

- name: Lint
run: deno lint

test-deno:
name: Test Deno ${{ matrix.deno-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
deno-version: ["2.6", "2.7.2"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.deno-version }}

- name: Cache Deno dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/deno
~/.deno
key: ${{ runner.os }}-deno-${{ matrix.deno-version }}-${{ hashFiles('deno.jsonc', 'deno.lock') }}
restore-keys: |
${{ runner.os }}-deno-${{ matrix.deno-version }}-

- name: Clone Drizzle shared test suite
run: make clone-repo

- name: Install dependencies
run: deno install

- name: Run tests
run: deno task test

test-node:
name: Test Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["22", "24"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Clone Drizzle shared test suite
run: make clone-repo

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: clone-repos clean-repos test test-node22 test-node24 test-deno build lint fmt check
.PHONY: clone-repo clean-repos test test-node22 test-node24 test-deno build lint fmt check

# Clone Drizzle ORM repo for shared test suite
clone-repos:
clone-repo:
@mkdir -p repos
@if [ ! -d repos/drizzle-orm ]; then \
git clone --depth 1 https://github.com/drizzle-team/drizzle-orm.git repos/drizzle-orm; \
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,21 @@ This matches the sqlite-proxy specification. For most use cases, prefer the quer
- Docker and Docker Compose
- Make

### Local Setup

```bash
# Enable pre-commit hooks (runs fmt/lint/check)
git config core.hooksPath .githooks && \
chmod +x .githooks/pre-commit
```

### Running Tests

Tests run in Docker containers to ensure consistent environments.

```bash
# Clone Drizzle's shared test suite (required)
make clone-repos
make clone-repo

# Run Deno 2.7.2 tests (default)
make test-deno-2.7
Expand Down
189 changes: 0 additions & 189 deletions REVIEW.md

This file was deleted.

3 changes: 1 addition & 2 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"$schema": "https://jsr.io/schema/config-file.v1.json",
"name": "@hotsauce/drizzle-deno-sqlite",
"name": "@hotsauce/drizzle-runtime-sqlite",
"version": "0.1.0",
"exports": "./mod.ts",
"imports": {
Expand Down
Loading