Skip to content

Commit

Permalink
bun workflow
Browse files Browse the repository at this point in the history
..
  • Loading branch information
igalklebanov committed May 29, 2024
1 parent d2f0323 commit c1a53b2
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 6 deletions.
48 changes: 47 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main]

jobs:
test:
node:
strategy:
matrix:
node-version: [18, 20, 22]
Expand Down Expand Up @@ -60,3 +60,49 @@ jobs:
- name: kysely migrate:rollback --all
working-directory: examples/node-${{ matrix.type }}
run: pnpm kysely migrate:rollback --all --debug

bun:
runs-on: ubuntu-latest

name: ubuntu-latest + Bun

steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

- uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: pnpm i && pnpm build && bun link && cd examples/bun && bun install

- name: kysely -v
working-directory: examples/bun
run: bun kysely -v

- name: kysely migrate:make <migration-name>
working-directory: examples/bun
run: bun kysely migrate:make moshe --debug

- name: kysely migrate:list
working-directory: examples/bun
run: bun kysely migrate:list --debug

- name: kysely migrate:latest
working-directory: examples/bun
run: bun kysely migrate:latest --debug

- name: kysely migrate:rollback --all
working-directory: examples/bun
run: bun kysely migrate:rollback --all --debug
Binary file modified examples/bun/bun.lockb
Binary file not shown.
7 changes: 2 additions & 5 deletions examples/bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
"module": "index.ts",
"type": "module",
"scripts": {
"up": "bun --bun kysely migrate:up",
"down": "bun --bun kysely migrate:down",
"latest": "bun --bun kysely migrate:latest",
"rollback": "bun --bun kysely migrate:rollback --all"
"kysely": "bun --bun kysely"
},
"devDependencies": {
"@types/bun": "latest",
"kysely-ctl": "^0.8.1"
"kysely-ctl": "link:kysely-ctl"
},
"peerDependencies": {
"typescript": "^5.0.0"
Expand Down

0 comments on commit c1a53b2

Please sign in to comment.