Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
joseferben committed Oct 5, 2024
1 parent b62a633 commit 65ace17
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ jobs:
bun-version: 1.1.29
- name: install dependencies 🔧
run: bun install
- name: migrate ✅
run: |
timeout_cmd=""
if [ "$RUNNER_OS" == "Windows" ]; then
timeout_cmd="timeout 3"
else
timeout_cmd="timeout 3s"
fi
$timeout_cmd bun run example/0-todo.tsx || true
shell: bash
- name: build ✅
run: bun run build
- name: test ✅
Expand Down
11 changes: 10 additions & 1 deletion example/0-todo.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
import { Hono } from "hono";
import { jsxRenderer } from "hono/jsx-renderer";
import { logger } from "hono/logger";
import type { DB } from "kysely-codegen";
import { form, store } from "plainstack";
import { bunSqlite, secret } from "plainstack/bun";
import { session } from "plainstack/session";

interface Items {
content: string;
createdAt: number;
id: string;
}

interface DB {
items: Items;
}

const { database, migrate } = bunSqlite<DB>();

await migrate(({ schema }) => {
Expand Down
4 changes: 4 additions & 0 deletions src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export function migrate(
});
}
consola.info("✓ types generated");
if (process.env.MIRGATE) {
console.info("MIGRATE env var set, stopping process");
process.exit(0);
}
};
}

Expand Down

0 comments on commit 65ace17

Please sign in to comment.